Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit f935c62

Browse files
authored
Revert "Drop unused tables & unneeded access token ID for events. (#16268)"
This reverts commit cabd577.
1 parent d6b7d49 commit f935c62

File tree

4 files changed

+8
-29
lines changed

4 files changed

+8
-29
lines changed

changelog.d/16268.misc

Lines changed: 0 additions & 1 deletion
This file was deleted.

synapse/handlers/message.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,9 +693,13 @@ async def create_event(
693693
if require_consent and not is_exempt:
694694
await self.assert_accepted_privacy_policy(requester)
695695

696-
# Save the the device ID and the transaction ID in the event internal metadata.
697-
# This is useful to determine if we should echo the transaction_id in events.
696+
# Save the access token ID, the device ID and the transaction ID in the event
697+
# internal metadata. This is useful to determine if we should echo the
698+
# transaction_id in events.
698699
# See `synapse.events.utils.EventClientSerializer.serialize_event`
700+
if requester.access_token_id is not None:
701+
builder.internal_metadata.token_id = requester.access_token_id
702+
699703
if requester.device_id is not None:
700704
builder.internal_metadata.device_id = requester.device_id
701705

synapse/storage/schema/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@
125125

126126

127127
SCHEMA_COMPAT_VERSION = (
128-
# The event_txn_id table and tables from MSC2716 no longer exist.
129-
82
128+
# The `event_txn_id_device_id` must be written to for new events.
129+
80
130130
)
131131
"""Limit on how far the synapse codebase can be rolled back without breaking db compat
132132

synapse/storage/schema/main/delta/82/03_drop_old_tables.sql

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)