summary refs log tree commit diff
path: root/synapse/server_notices/server_notices_manager.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-08-24 14:50:03 +0100
committerErik Johnston <erik@matrix.org>2018-08-24 14:50:03 +0100
commitcdd24449eeec12f869ceca233085f957d8dc7d19 (patch)
treef4f155b138d4504cb6020edba38019f91282936f /synapse/server_notices/server_notices_manager.py
parentMake content of tag an empty object rather than null (diff)
downloadsynapse-cdd24449eeec12f869ceca233085f957d8dc7d19.tar.xz
Ensure we wake up /sync when we add tag to notice room
Diffstat (limited to 'synapse/server_notices/server_notices_manager.py')
-rw-r--r--synapse/server_notices/server_notices_manager.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/server_notices/server_notices_manager.py b/synapse/server_notices/server_notices_manager.py
index a5e4728859..c5cc6d728e 100644
--- a/synapse/server_notices/server_notices_manager.py
+++ b/synapse/server_notices/server_notices_manager.py
@@ -39,6 +39,8 @@ class ServerNoticesManager(object):
         self._event_creation_handler = hs.get_event_creation_handler()
         self._is_mine_id = hs.is_mine_id
 
+        self._notifier = hs.get_notifier()
+
     def is_enabled(self):
         """Checks if server notices are enabled on this server.
 
@@ -153,9 +155,13 @@ class ServerNoticesManager(object):
             creator_join_profile=join_profile,
         )
         room_id = info['room_id']
-        yield self._store.add_tag_to_room(
+
+        max_id = yield self._store.add_tag_to_room(
             user_id, room_id, SERVER_NOTICE_ROOM_TAG, {},
         )
+        self._notifier.on_new_event(
+            "account_data_key", max_id, users=[user_id]
+        )
 
         logger.info("Created server notices room %s for %s", room_id, user_id)
         defer.returnValue(room_id)