mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
DEV: extract the logic for extracting and expanding mentions from ChatNotifier (#20290)
Initially, the ChatMention model / db table was introduced to better support notifications (see discourse/discourse-chat@0801d10). That means that currently, we create a new chat_mention record only if a user will be notified about the mention. Now we plan to start using the ChatMention model in other scenarios (for example for implementing user status on mentions) so we need to always create a new record in the chat_mention table. This PR does the first step into that direction by decoupling the logic for extracting and expanding mentions from the code related to notifications. This doesn't change any behavior, only extracts code from ChatNotifier.
This commit is contained in:

committed by
GitHub

parent
7391f8e077
commit
75b81b6854
@ -178,6 +178,7 @@ after_initialize do
|
||||
load File.expand_path("../lib/chat_message_updater.rb", __FILE__)
|
||||
load File.expand_path("../lib/chat_message_rate_limiter.rb", __FILE__)
|
||||
load File.expand_path("../lib/chat_message_reactor.rb", __FILE__)
|
||||
load File.expand_path("../lib/chat_message_mentions.rb", __FILE__)
|
||||
load File.expand_path("../lib/chat_notifier.rb", __FILE__)
|
||||
load File.expand_path("../lib/chat_seeder.rb", __FILE__)
|
||||
load File.expand_path("../lib/chat_statistics.rb", __FILE__)
|
||||
|
Reference in New Issue
Block a user