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:
David Taylor
2024-08-06 19:13:13 +01:00
committed by GitHub
parent fe307ea2f0
commit 66de6a43a8
4 changed files with 24 additions and 2 deletions

View File

@ -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