discourse/plugins/chat
Andrei Prigorshnev e6299a310f
FIX: Further optimize mentioning groups in chat messages (#24122)
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.
2023-10-31 18:17:37 +04:00
..
app DEV: adds a `:chat_thread_created` trigger (#24133) 2023-10-27 10:27:34 +02:00
assets UX: fix minor chat transcript overflow (#24158) 2023-10-30 16:31:01 -04:00
config FEATURE: Add new chat indicator preference for Only Mentions (#23848) 2023-10-27 15:58:19 +08:00
db FEATURE: implements user based sidebar mode (#23078) 2023-08-18 20:33:07 +02:00
lib FIX: Further optimize mentioning groups in chat messages (#24122) 2023-10-31 18:17:37 +04:00
public
spec FiX: Update date url for thread oneboxes (#24172) 2023-10-31 08:04:40 -03:00
test/javascripts FIX: correctly display escaped thread titles (#24159) 2023-10-30 21:06:31 +01:00
README.md DEV: Chat service object initial implementation (#19814) 2023-02-13 13:09:57 +01:00
plugin.rb DEV: Add meta_topic_id plugin metadata (#23838) 2023-10-10 10:16:13 +10:00

README.md

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.