diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2022-05-16 16:35:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 15:35:31 +0000 |
commit | 83be72d76ca171ceb0fc381aa4548c1d9fea0dc7 (patch) | |
tree | c7d4fee54f2b7ba7993c15b6d892d9579da3d91b /synapse/handlers/account_data.py | |
parent | Avoid unnecessary copies when filtering private read receipts. (#12711) (diff) | |
download | synapse-83be72d76ca171ceb0fc381aa4548c1d9fea0dc7.tar.xz |
Add `StreamKeyType` class and replace string literals with constants (#12567)
Diffstat (limited to 'synapse/handlers/account_data.py')
-rw-r--r-- | synapse/handlers/account_data.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/handlers/account_data.py b/synapse/handlers/account_data.py index 4af9fbc5d1..0478448b47 100644 --- a/synapse/handlers/account_data.py +++ b/synapse/handlers/account_data.py @@ -23,7 +23,7 @@ from synapse.replication.http.account_data import ( ReplicationUserAccountDataRestServlet, ) from synapse.streams import EventSource -from synapse.types import JsonDict, UserID +from synapse.types import JsonDict, StreamKeyType, UserID if TYPE_CHECKING: from synapse.server import HomeServer @@ -105,7 +105,7 @@ class AccountDataHandler: ) self._notifier.on_new_event( - "account_data_key", max_stream_id, users=[user_id] + StreamKeyType.ACCOUNT_DATA, max_stream_id, users=[user_id] ) await self._notify_modules(user_id, room_id, account_data_type, content) @@ -141,7 +141,7 @@ class AccountDataHandler: ) self._notifier.on_new_event( - "account_data_key", max_stream_id, users=[user_id] + StreamKeyType.ACCOUNT_DATA, max_stream_id, users=[user_id] ) await self._notify_modules(user_id, None, account_data_type, content) @@ -176,7 +176,7 @@ class AccountDataHandler: ) self._notifier.on_new_event( - "account_data_key", max_stream_id, users=[user_id] + StreamKeyType.ACCOUNT_DATA, max_stream_id, users=[user_id] ) return max_stream_id else: @@ -201,7 +201,7 @@ class AccountDataHandler: ) self._notifier.on_new_event( - "account_data_key", max_stream_id, users=[user_id] + StreamKeyType.ACCOUNT_DATA, max_stream_id, users=[user_id] ) return max_stream_id else: |