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

Commit

Permalink
Fix-up one more spot.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Apr 6, 2023
1 parent b18ab18 commit b682443
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1909,12 +1909,18 @@ async def persist_and_notify_client_events(
room_version_obj = KNOWN_ROOM_VERSIONS[room_version]

create_event = await self.store.get_create_event_for_room(event.room_id)
if room_version_obj.msc2175_implicit_room_creator:
room_creator = create_event.sender
else:
room_creator = create_event.content.get(
EventContentFields.ROOM_CREATOR
)

# Only check an insertion event if the room version
# supports it or the event is from the room creator.
if room_version_obj.msc2716_historical or (
self.config.experimental.msc2716_enabled
and event.sender == create_event.sender
and event.sender == room_creator
):
next_batch_id = event.content.get(
EventContentFields.MSC2716_NEXT_BATCH_ID
Expand Down

0 comments on commit b682443

Please sign in to comment.