diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-01-20 05:44:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 10:44:52 +0000 |
commit | fa842a98666afe2425e5cfad9966be1cfb998b42 (patch) | |
tree | 9de4df2437a2c97b331bed97fed25d4f96f8138e | |
parent | Validate the server name for the /publicRooms endpoint. (#9161) (diff) | |
download | synapse-fa842a98666afe2425e5cfad9966be1cfb998b42.tar.xz |
Use the account handler in additional places. (#9166)
Diffstat (limited to '')
-rw-r--r-- | changelog.d/9166.feature | 1 | ||||
-rw-r--r-- | synapse/server_notices/resource_limits_server_notices.py | 3 | ||||
-rw-r--r-- | synapse/server_notices/server_notices_manager.py | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/changelog.d/9166.feature b/changelog.d/9166.feature new file mode 100644 index 0000000000..1c4f88bce9 --- /dev/null +++ b/changelog.d/9166.feature @@ -0,0 +1 @@ +Add experimental support for moving off receipts and account data persistence off master. diff --git a/synapse/server_notices/resource_limits_server_notices.py b/synapse/server_notices/resource_limits_server_notices.py index 2258d306d9..8dd01fce76 100644 --- a/synapse/server_notices/resource_limits_server_notices.py +++ b/synapse/server_notices/resource_limits_server_notices.py @@ -42,6 +42,7 @@ class ResourceLimitsServerNotices: self._auth = hs.get_auth() self._config = hs.config self._resouce_limited = False + self._account_data_handler = hs.get_account_data_handler() self._message_handler = hs.get_message_handler() self._state = hs.get_state_handler() @@ -177,7 +178,7 @@ class ResourceLimitsServerNotices: # tag already present, nothing to do here need_to_set_tag = False if need_to_set_tag: - max_id = await self._store.add_tag_to_room( + max_id = await self._account_data_handler.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]) diff --git a/synapse/server_notices/server_notices_manager.py b/synapse/server_notices/server_notices_manager.py index 100dbd5e2c..c46b2f047d 100644 --- a/synapse/server_notices/server_notices_manager.py +++ b/synapse/server_notices/server_notices_manager.py @@ -35,6 +35,7 @@ class ServerNoticesManager: self._store = hs.get_datastore() self._config = hs.config + self._account_data_handler = hs.get_account_data_handler() self._room_creation_handler = hs.get_room_creation_handler() self._room_member_handler = hs.get_room_member_handler() self._event_creation_handler = hs.get_event_creation_handler() @@ -163,7 +164,7 @@ class ServerNoticesManager: ) room_id = info["room_id"] - max_id = await self._store.add_tag_to_room( + max_id = await self._account_data_handler.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]) |