mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
user_topic: Add user_topic event.
We now send a new user_topic event while muting and unmuting topics. fetch_initial_state_data now returns an additional user_topics array to the client that will maintain the user-topic relationship data. This will support any future addition of new features to modify the relationship between a user-topic pair. This commit adds the relevent backend code and schema for the new event.
This commit is contained in:
committed by
Tim Abbott
parent
8b674ee3d7
commit
1291e7000b
@@ -2545,6 +2545,9 @@ class UserTopic(models.Model):
|
||||
# Implicitly, if a UserTopic does not exist, the (user, topic)
|
||||
# pair should have normal behavior for that (user, stream) pair.
|
||||
|
||||
# We use this in our code to represent the condition in the comment above.
|
||||
VISIBILITY_POLICY_INHERIT = 0
|
||||
|
||||
# A normal muted topic. No notifications and unreads hidden.
|
||||
MUTED = 1
|
||||
|
||||
@@ -2559,6 +2562,7 @@ class UserTopic(models.Model):
|
||||
(MUTED, "Muted topic"),
|
||||
(UNMUTED, "Unmuted topic in muted stream"),
|
||||
(FOLLOWED, "Followed topic"),
|
||||
(VISIBILITY_POLICY_INHERIT, "User's default policy for the stream."),
|
||||
)
|
||||
|
||||
visibility_policy: int = models.SmallIntegerField(
|
||||
|
||||
Reference in New Issue
Block a user