mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 16:07:17 +08:00
BUGFIX: notifications were not updated correctly live
- missing notifications when multiple replies in topic (till refresh) - not cleared properly on click
This commit is contained in:
@ -123,12 +123,7 @@ class Notification < ActiveRecord::Base
|
||||
protected
|
||||
|
||||
def refresh_notification_count
|
||||
user_id = user.id
|
||||
MessageBus.publish("/notification/#{user_id}",
|
||||
{unread_notifications: user.unread_notifications,
|
||||
unread_private_messages: user.unread_private_messages},
|
||||
user_ids: [user_id] # only publish the notification to this user
|
||||
)
|
||||
user.publish_notifications_state
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user