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

Implement MSC2175 to stop adding the creator field. #15394

Merged
merged 13 commits into from
Apr 6, 2023
Prev Previous commit
Next Next commit
Update check against creator.
  • Loading branch information
clokep committed Apr 5, 2023
commit a353870852b7bbfbc151ad0ecb21741ef04c92ab
6 changes: 5 additions & 1 deletion synapse/event_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,11 @@ def _is_membership_change_allowed(
key = (EventTypes.Create, "")
create = auth_events.get(key)
if create and event.prev_event_ids()[0] == create.event_id:
if create.sender == event.state_key:
if room_version.msc2175_implicit_room_creator:
creator = create.sender
else:
creator = create.content[EventContentFields.ROOM_CREATOR]
if creator == event.state_key:
return

target_user_id = event.state_key
Expand Down