mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
BUGFIX: muted categories showing up in new via message bus
This commit is contained in:
@@ -22,7 +22,8 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
:should_be_redirected_to_top,
|
||||
:redirected_to_top_reason,
|
||||
:disable_jump_reply,
|
||||
:custom_fields
|
||||
:custom_fields,
|
||||
:muted_category_ids
|
||||
|
||||
def include_site_flagged_posts_count?
|
||||
object.staff?
|
||||
@@ -93,4 +94,10 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
end
|
||||
end
|
||||
|
||||
def muted_category_ids
|
||||
@muted_category_ids ||= CategoryUser.where(user_id: object.id,
|
||||
notification_level: TopicUser.notification_levels[:muted])
|
||||
.pluck(:category_id)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user