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

Commit

Permalink
Revert "Drop unused tables & unneeded access token ID for events. (#1…
Browse files Browse the repository at this point in the history
…6268)" (#16465)

This reverts commit cabd577.

There are additional usages of these tables
which need to be removed first.
  • Loading branch information
clokep authored Oct 12, 2023
1 parent f710d54 commit 4cc729d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 29 deletions.
1 change: 0 additions & 1 deletion changelog.d/16268.misc

This file was deleted.

8 changes: 6 additions & 2 deletions synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,13 @@ async def create_event(
if require_consent and not is_exempt:
await self.assert_accepted_privacy_policy(requester)

# Save the the device ID and the transaction ID in the event internal metadata.
# This is useful to determine if we should echo the transaction_id in events.
# Save the access token ID, the device ID and the transaction ID in the event
# internal metadata. This is useful to determine if we should echo the
# transaction_id in events.
# See `synapse.events.utils.EventClientSerializer.serialize_event`
if requester.access_token_id is not None:
builder.internal_metadata.token_id = requester.access_token_id

if requester.device_id is not None:
builder.internal_metadata.device_id = requester.device_id

Expand Down
4 changes: 2 additions & 2 deletions synapse/storage/schema/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@


SCHEMA_COMPAT_VERSION = (
# The event_txn_id table and tables from MSC2716 no longer exist.
82
# The `event_txn_id_device_id` must be written to for new events.
80
)
"""Limit on how far the synapse codebase can be rolled back without breaking db compat
Expand Down
24 changes: 0 additions & 24 deletions synapse/storage/schema/main/delta/82/03_drop_old_tables.sql

This file was deleted.

0 comments on commit 4cc729d

Please sign in to comment.