mirror of
https://github.com/discourse/discourse.git
synced 2025-01-27 12:36:32 +08:00
4b49e358fb
When we use CTRL/CMD + K to search, on the server we run 4 queries: - 1 for users - 1 for groups - 1 for category channels - 1 for direct message channels The server returns up to 10 results per type and the client concatenate all the results (in the order I described) and then takes the first 10 or so. Let's say you've had 1:1s with john1, john2, and john3. Searching for “john” would return all the johns as “users”. It doesn’t make sense to also return them as 1:1 dms. That’s what this fixes. When the search returns some users, we skip all 1:1s because we assume they will show up as the results of the “users” query. We’ll always return matching direct messages with more than 2 users (aka. “group chats”). All 3 other queries (users, groups, and category channels) are unaffected. Internal ref - t/136079 |
||
---|---|---|
.. | ||
chat |