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

Commit 66539b6

Browse files
committed
Also don't answer /make_join
1 parent 52327e0 commit 66539b6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

synapse/handlers/federation.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,19 @@ async def on_make_join_request(
748748
# (and return a 404 otherwise)
749749
room_version = await self.store.get_room_version(room_id)
750750

751+
if await self.store.is_partial_state_room(room_id):
752+
# If our server is still only partially joined, we can't give a complete
753+
# response to send_join, so return a 404 as we would if we weren't in the
754+
# room at all.
755+
logger.info(
756+
"Rejecting make_join to %s because it's a partial state room", room_id
757+
)
758+
raise SynapseError(
759+
404,
760+
"Unable to handle make_join right now; this server is not fully joined.",
761+
errcode=Codes.NOT_FOUND,
762+
)
763+
751764
# now check that we are *still* in the room
752765
is_in_room = await self._event_auth_handler.check_host_in_room(
753766
room_id, self.server_name

0 commit comments

Comments
 (0)