mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: Add chat message notifications for personal chats (#23307)
This feature adds notifications for chat messages that are sent within personal chats (1:1 and personal group chats). To prevent notification spam we make use of consolidated notifications to combine updated message information in a meaningful way that allows the receiver to quickly jump into the chat to see what they missed. This update respects muted channels, muted and blocked users. It will only create a new notification when the user has not muted the channel and the notified user is not muting or ignoring the message sender.
This commit is contained in:
@ -59,6 +59,7 @@ after_initialize do
|
||||
|
||||
Guardian.prepend Chat::GuardianExtensions
|
||||
UserNotifications.prepend Chat::UserNotificationsExtension
|
||||
Notifications::ConsolidationPlan.prepend Chat::NotificationConsolidationExtension
|
||||
UserOption.prepend Chat::UserOptionExtension
|
||||
Category.prepend Chat::CategoryExtension
|
||||
Reviewable.prepend Chat::ReviewableExtension
|
||||
@ -472,6 +473,10 @@ after_initialize do
|
||||
)
|
||||
|
||||
register_bookmarkable(Chat::MessageBookmarkable)
|
||||
|
||||
register_notification_consolidation_plan(
|
||||
Chat::NotificationConsolidationExtension.chat_message_plan,
|
||||
)
|
||||
end
|
||||
|
||||
if Rails.env == "test"
|
||||
|
Reference in New Issue
Block a user