discourse/plugins/chat/app/services/chat
Régis Hanol 7cf28fec7b
PERF: optimize chat user membership cleanup when removing a single user (#29833)
This optimizes a hot path when users are being removed from one or more groups since we use the `on(:user_removed_from_group)` event to call the `Chat::AutoLeaveChannels` with a `user_id` parameter. In such case, we don't need to clear the membership of all users, just that one user.

DEBUG: Also added a "-- event = <event>" comment on top of the SQL queries used by the "AutoLeaveChannels" so they show up in the logs and hopefully facilitate any performance issues that might arise in the future.
2024-11-20 09:21:02 +01:00
..
action PERF: auto join & leave chat channels (#29193) 2024-11-12 15:00:59 +11:00
channel/policy DEV: Introduce a Service::ActionBase class for service actions 2024-09-18 17:02:46 +02:00
direct_message_channel/policy DEV: Introduce a Service::ActionBase class for service actions 2024-09-18 17:02:46 +02:00
add_users_to_channel.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
auto_join_channels.rb PERF: auto join & leave chat channels (#29193) 2024-11-12 15:00:59 +11:00
auto_leave_channels.rb PERF: optimize chat user membership cleanup when removing a single user (#29833) 2024-11-20 09:21:02 +01:00
create_category_channel.rb PERF: auto join & leave chat channels (#29193) 2024-11-12 15:00:59 +11:00
create_direct_message_channel.rb DEV: sets an icon_upload_id on a channel (#29566) 2024-11-04 17:19:44 +09:00
create_message_interaction.rb DEV: adds blocks support to chat messages (#29782) 2024-11-19 07:07:58 +01:00
create_message.rb DEV: adds blocks support to chat messages (#29782) 2024-11-19 07:07:58 +01:00
create_thread.rb DEV: Refactor the Chat::CreateThread service a bit 2024-11-06 15:53:43 +01:00
flag_message.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
invite_users_to_channel.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
leave_channel.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
list_channel_messages.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
list_channel_thread_messages.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
list_user_channels.rb FIX: show chat thread notifications for direct message channels (#29414) 2024-10-31 10:50:11 +04:00
lookup_channel_threads.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
lookup_thread.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
lookup_user_threads.rb FIX: show chat thread notifications for direct message channels (#29414) 2024-10-31 10:50:11 +04:00
mark_all_user_channels_read.rb DEV: Provide user input to services using params key 2024-10-25 09:57:59 +02:00
mark_thread_title_prompt_seen.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
message_destroyer.rb DEV: Add last_message_id to channel and thread (#22488) 2023-07-13 10:28:11 +10:00
publisher.rb PERF: auto join & leave chat channels (#29193) 2024-11-12 15:00:59 +11:00
restore_message.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
search_chatable.rb DEV: Bump rubocop_discourse (#29608) 2024-11-06 06:27:49 +08:00
start_reply.rb DEV: start/stop reply implementation (#29542) 2024-11-04 08:14:35 +11:00
stop_message_streaming.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
stop_reply.rb DEV: start/stop reply implementation (#29542) 2024-11-04 08:14:35 +11:00
tracking_state.rb DEV: Replace params by the contract object in services 2024-10-25 14:48:34 +02:00
trash_channel.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
trash_message.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
trash_messages.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
unfollow_channel.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
update_channel_status.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
update_channel.rb PERF: auto join & leave chat channels (#29193) 2024-11-12 15:00:59 +11:00
update_message.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
update_thread_notification_settings.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
update_thread.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
update_user_channel_last_read.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
update_user_thread_last_read.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00
upsert_draft.rb DEV: Remove hash-like access from service contracts 2024-10-29 16:02:51 +01:00