mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
A follow-up to faac6773. This PR eliminates one more heavy join by forcing Active Record to do two queries instead. Also, along the way, I made this change: ``` # this generates two quries to the groups table def groups_to_mention @groups_to_mention = mentionable_groups - groups_with_too_many_members end # so I changed it to (this makes only one query to the groups table): def groups_to_mention @groups_to_mention ||= mentionable_groups.where("user_count <= ?", SiteSetting.max_users_notified_per_group_mention) end ``` This one is kind of a premature optimization, because we don't have evidence that this extra query is a problem, but it seems cleaner this way. Commits history on this PR may help better understand the change.
This plugin is still in active development and may change frequently
Documentation
The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.
For user documentation, see Discourse Chat.
For developer documentation, see Discourse Documentation.