3
0

Do not include deleted channels in the list

This commit is contained in:
Denis Arh 2019-06-25 13:00:36 +02:00
parent bb447ee795
commit 49f55fd327

View File

@ -130,6 +130,10 @@ func (r *channel) Find(filter *types.ChannelFilter) (types.ChannelSet, error) {
sql += " AND c.id IN " + sqlChannelAccess
params = append(params, filter.CurrentUserID, types.ChannelTypePublic)
}
if !filter.IncludeDeleted {
sql += " AND deleted_at IS NULL"
}
}
sql += " ORDER BY c.name ASC"