diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-03-24 13:23:30 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-03-24 13:23:30 +0000 |
commit | 4f819f092d852e8a61479790fc6aa0c3287a80e4 (patch) | |
tree | 9739d3b1660e933cd799a42a760f1f4358a35011 /synapse/handlers | |
parent | Upsert room version when we join over federation (#6968) (diff) | |
parent | Remove redundant store_room call (#6979) (diff) | |
download | synapse-4f819f092d852e8a61479790fc6aa0c3287a80e4.tar.xz |
Remove redundant store_room call (#6979)
* commit '691659568': Remove redundant store_room call (#6979)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/federation.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index f9f4358cc7..5571ed5dc5 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -41,7 +41,6 @@ from synapse.api.errors import ( FederationDeniedError, FederationError, RequestSendFailed, - StoreError, SynapseError, ) from synapse.api.room_versions import KNOWN_ROOM_VERSIONS, RoomVersion, RoomVersions @@ -711,28 +710,6 @@ class FederationHandler(BaseHandler): except AuthError as e: raise FederationError("ERROR", e.code, e.msg, affected=event.event_id) - room = await self.store.get_room(room_id) - - if not room: - try: - prev_state_ids = await context.get_prev_state_ids() - create_event = await self.store.get_event( - prev_state_ids[(EventTypes.Create, "")] - ) - - room_version_id = create_event.content.get( - "room_version", RoomVersions.V1.identifier - ) - - await self.store.store_room( - room_id=room_id, - room_creator_user_id="", - is_public=False, - room_version=KNOWN_ROOM_VERSIONS[room_version_id], - ) - except StoreError: - logger.exception("Failed to store room.") - if event.type == EventTypes.Member: if event.membership == Membership.JOIN: # Only fire user_joined_room if the user has acutally |