FIX: Remove tags from experimental sidebar on notification level changed (#17083)

As part of this commit, a bug where updating a tag's notification level on the server side does not update the state of the user's tag notification levels on the client side is fixed too.
This commit is contained in:
Alan Guo Xiang Tan
2022-06-14 15:39:56 +08:00
committed by GitHub
parent 47034d9ca0
commit e7e23e8d9c
12 changed files with 167 additions and 78 deletions

View File

@@ -1,6 +1,7 @@
# frozen_string_literal: true
class UserSerializer < UserCardSerializer
include UserTagNotificationsMixin
attributes :bio_raw,
:bio_cooked,
@@ -211,22 +212,6 @@ class UserSerializer < UserCardSerializer
###
### PRIVATE ATTRIBUTES
###
def muted_tags
tags_with_notification_level(:muted)
end
def tracked_tags
tags_with_notification_level(:tracking)
end
def watching_first_post_tags
tags_with_notification_level(:watching_first_post)
end
def watched_tags
tags_with_notification_level(:watching)
end
def muted_category_ids
categories_with_notification_level(:muted)
end