diff options
author | Erik Johnston <erik@matrix.org> | 2023-01-13 14:57:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 14:57:43 +0000 |
commit | 73ff493dfba63541a09eaf08587eb8bbd3330967 (patch) | |
tree | 97691d93c6e16922f85f1555577ffec2aece2142 /synapse/handlers/initial_sync.py | |
parent | Update misleading documentation ` user_directory.search_all_users ` (#14818) (diff) | |
download | synapse-73ff493dfba63541a09eaf08587eb8bbd3330967.tar.xz |
Merge account data streams (#14826)
Diffstat (limited to 'synapse/handlers/initial_sync.py')
-rw-r--r-- | synapse/handlers/initial_sync.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/handlers/initial_sync.py b/synapse/handlers/initial_sync.py index 9c335e6863..8c2260ad7d 100644 --- a/synapse/handlers/initial_sync.py +++ b/synapse/handlers/initial_sync.py @@ -15,7 +15,7 @@ import logging from typing import TYPE_CHECKING, List, Optional, Tuple, cast -from synapse.api.constants import EduTypes, EventTypes, Membership +from synapse.api.constants import AccountDataTypes, EduTypes, EventTypes, Membership from synapse.api.errors import SynapseError from synapse.events import EventBase from synapse.events.utils import SerializeEventConfig @@ -239,7 +239,7 @@ class InitialSyncHandler: tags = tags_by_room.get(event.room_id) if tags: account_data_events.append( - {"type": "m.tag", "content": {"tags": tags}} + {"type": AccountDataTypes.TAG, "content": {"tags": tags}} ) account_data = account_data_by_room.get(event.room_id, {}) @@ -326,7 +326,9 @@ class InitialSyncHandler: account_data_events = [] tags = await self.store.get_tags_for_room(user_id, room_id) if tags: - account_data_events.append({"type": "m.tag", "content": {"tags": tags}}) + account_data_events.append( + {"type": AccountDataTypes.TAG, "content": {"tags": tags}} + ) account_data = await self.store.get_account_data_for_room(user_id, room_id) for account_data_type, content in account_data.items(): |