diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2022-02-21 19:27:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 19:27:35 +0000 |
commit | 3070af4809016f547adf55fb02dbe9e569590f7e (patch) | |
tree | 370845e3044592c664a30f564f53b2799a68db5f /synapse/storage/databases | |
parent | Minor typing fixes (#12034) (diff) | |
download | synapse-3070af4809016f547adf55fb02dbe9e569590f7e.tar.xz |
remote join processing: get create event from state, not auth_chain (#12039)
A follow-up to #12005, in which I apparently missed that there are a bunch of other places that assume the create event is in the auth chain.
Diffstat (limited to 'synapse/storage/databases')
-rw-r--r-- | synapse/storage/databases/main/room.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py index 95167116c9..0416df64ce 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py @@ -1498,7 +1498,7 @@ class RoomStore(RoomBackgroundUpdateStore, RoomWorkerStore): self._event_reports_id_gen = IdGenerator(db_conn, "event_reports", "id") async def upsert_room_on_join( - self, room_id: str, room_version: RoomVersion, auth_events: List[EventBase] + self, room_id: str, room_version: RoomVersion, state_events: List[EventBase] ) -> None: """Ensure that the room is stored in the table @@ -1511,7 +1511,7 @@ class RoomStore(RoomBackgroundUpdateStore, RoomWorkerStore): has_auth_chain_index = await self.has_auth_chain_index(room_id) create_event = None - for e in auth_events: + for e in state_events: if (e.type, e.state_key) == (EventTypes.Create, ""): create_event = e break |