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:
Kartik Srivastava
2022-02-26 02:18:56 +05:30
committed by Tim Abbott
parent 8b674ee3d7
commit 1291e7000b
14 changed files with 264 additions and 16 deletions

View File

@@ -1051,7 +1051,7 @@ class FetchQueriesTest(ZulipTestCase):
with mock.patch("zerver.lib.events.always_want") as want_mock:
fetch_initial_state_data(user)
self.assert_length(queries, 36)
self.assert_length(queries, 37)
expected_counts = dict(
alert_words=1,
@@ -1086,6 +1086,7 @@ class FetchQueriesTest(ZulipTestCase):
update_message_flags=5,
user_settings=0,
user_status=1,
user_topic=1,
video_calls=0,
giphy=0,
)