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

Commit

Permalink
Also don't answer /make_join
Browse files Browse the repository at this point in the history
  • Loading branch information
reivilibre committed Jul 29, 2022
1 parent 52327e0 commit 66539b6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,19 @@ async def on_make_join_request(
# (and return a 404 otherwise)
room_version = await self.store.get_room_version(room_id)

if await self.store.is_partial_state_room(room_id):
# If our server is still only partially joined, we can't give a complete
# response to send_join, so return a 404 as we would if we weren't in the
# room at all.
logger.info(
"Rejecting make_join to %s because it's a partial state room", room_id
)
raise SynapseError(
404,
"Unable to handle make_join right now; this server is not fully joined.",
errcode=Codes.NOT_FOUND,
)

# now check that we are *still* in the room
is_in_room = await self._event_auth_handler.check_host_in_room(
room_id, self.server_name
Expand Down

0 comments on commit 66539b6

Please sign in to comment.