summary refs log tree commit diff
path: root/synapse/handlers/room_member.py
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2021-12-10 23:08:51 -0600
committerGitHub <noreply@github.com>2021-12-10 23:08:51 -0600
commitaa8708ebed74b03bdebd7e20ddf070c6fd620db1 (patch)
tree3a709c9417998d73851e64ca1621369459926b02 /synapse/handlers/room_member.py
parentTest to ensure we share the same `state_group` across the whole historical ba... (diff)
downloadsynapse-aa8708ebed74b03bdebd7e20ddf070c6fd620db1.tar.xz
Allow events to be created with no `prev_events` (MSC2716) (#11243)
The event still needs to have `auth_events` defined to be valid.

Split out from https://github.com/matrix-org/synapse/pull/11114
Diffstat (limited to 'synapse/handlers/room_member.py')
-rw-r--r--synapse/handlers/room_member.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py
index a6dbff637f..447e3ce571 100644
--- a/synapse/handlers/room_member.py
+++ b/synapse/handlers/room_member.py
@@ -658,7 +658,8 @@ class RoomMemberHandler(metaclass=abc.ABCMeta):
             if block_invite:
                 raise SynapseError(403, "Invites have been disabled on this server")
 
-        if prev_event_ids:
+        # An empty prev_events list is allowed as long as the auth_event_ids are present
+        if prev_event_ids is not None:
             return await self._local_membership_update(
                 requester=requester,
                 target=target,