mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 20:44:40 +08:00
FEATURE: Do not disturb (#11484)
This commit is contained in:

committed by
GitHub

parent
806f05f851
commit
649ed24bb4
@ -49,7 +49,8 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
:title_count_mode,
|
||||
:timezone,
|
||||
:featured_topic,
|
||||
:skip_new_user_tips
|
||||
:skip_new_user_tips,
|
||||
:do_not_disturb_until,
|
||||
|
||||
def groups
|
||||
object.visible_groups.pluck(:id, :name).map { |id, name| { id: id, name: name } }
|
||||
@ -237,4 +238,8 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
def featured_topic
|
||||
object.user_profile.featured_topic
|
||||
end
|
||||
|
||||
def do_not_disturb_until
|
||||
object.active_do_not_disturb_timings.maximum(:ends_at)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user