🐛 Fix get available channel in global also read channels in realm
This commit is contained in:
parent
a3ef3d52d7
commit
afb3b939e7
@ -156,6 +156,8 @@ func ListAvailableChannel(tx *gorm.DB, user models.Account, realmId ...uint) ([]
|
||||
tx = tx.Preload("Realm").Where("id IN ?", idx)
|
||||
if len(realmId) > 0 {
|
||||
tx = tx.Where("realm_id = ?", realmId)
|
||||
} else {
|
||||
tx = tx.Where("realm_id IS NULL")
|
||||
}
|
||||
|
||||
tx = PreloadDirectChannelMembers(tx)
|
||||
|
Loading…
Reference in New Issue
Block a user