mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 20:34:50 +08:00
FIX: Ensure do-not-disturb icon updates correctly (#28253)
`currentUser.do_not_disturb_until` is a string, so we need to parse it before comparing to the current timestamp
This commit is contained in:
@ -12,6 +12,7 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
:read_first_notification?,
|
||||
:admin?,
|
||||
:notification_channel_position,
|
||||
:do_not_disturb_channel_position,
|
||||
:moderator?,
|
||||
:staff?,
|
||||
:whisperer?,
|
||||
@ -320,4 +321,8 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
def use_glimmer_topic_list?
|
||||
scope.user.in_any_groups?(SiteSetting.experimental_glimmer_topic_list_groups_map)
|
||||
end
|
||||
|
||||
def do_not_disturb_channel_position
|
||||
MessageBus.last_id("/do-not-disturb/#{object.id}")
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user