mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:25:24 +08:00
PERF: Remove unnecessary SQL UNION query when search public channels (#19515)
It is pointless to include DM channels because the query for public channel search restricts chatable type to `Category`.
This commit is contained in:

committed by
GitHub

parent
e30c5f80d5
commit
a176ce2fd0
@ -421,7 +421,6 @@ after_initialize do
|
||||
following: false,
|
||||
limit: 1,
|
||||
status: :open,
|
||||
exclude_dm_channels: true
|
||||
).exists?
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user