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

Commit

Permalink
Write new column
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Oct 10, 2022
1 parent 507bea0 commit 8f17eaa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ async def do_invite_join(
room_id=room_id,
servers=ret.servers_in_room,
device_lists_stream_id=self.store.get_device_stream_token(),
joined_via=origin,
)

try:
Expand Down
5 changes: 5 additions & 0 deletions synapse/storage/databases/main/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -1827,6 +1827,7 @@ async def store_partial_state_room(
room_id: str,
servers: Collection[str],
device_lists_stream_id: int,
joined_via: str,
) -> None:
"""Mark the given room as containing events with partial state.
Expand All @@ -1842,13 +1843,15 @@ async def store_partial_state_room(
servers: other servers known to be in the room
device_lists_stream_id: the device_lists stream ID at the time when we first
joined the room.
joined_via: the server name we requested a partial join from.
"""
await self.db_pool.runInteraction(
"store_partial_state_room",
self._store_partial_state_room_txn,
room_id,
servers,
device_lists_stream_id,
joined_via,
)

def _store_partial_state_room_txn(
Expand All @@ -1857,6 +1860,7 @@ def _store_partial_state_room_txn(
room_id: str,
servers: Collection[str],
device_lists_stream_id: int,
joined_via: str,
) -> None:
DatabasePool.simple_insert_txn(
txn,
Expand All @@ -1866,6 +1870,7 @@ def _store_partial_state_room_txn(
"device_lists_stream_id": device_lists_stream_id,
# To be updated later once the join event is persisted.
"join_event_id": None,
"joined_via": joined_via,
},
)
DatabasePool.simple_insert_many_txn(
Expand Down

0 comments on commit 8f17eaa

Please sign in to comment.