diff options
author | H. Shay <hillerys@element.io> | 2022-10-06 11:30:32 -0700 |
---|---|---|
committer | H. Shay <hillerys@element.io> | 2022-10-06 11:30:32 -0700 |
commit | e55e811b8c4b0c0ab8ab1b2aa016ed16ae38c7e6 (patch) | |
tree | 8b2a5a428e4efc1e65e263a9eabf18f41e156554 /synapse | |
parent | update callsites of action_for_event_by_user (diff) | |
download | synapse-e55e811b8c4b0c0ab8ab1b2aa016ed16ae38c7e6.tar.xz |
add power level event to batched events
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/room.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 7b5eb1cda9..f6030a7ad5 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -1157,6 +1157,7 @@ class RoomCreationHandler: depth += 1 state_map[(EventTypes.Member, creator.user.to_string())] = member_event_id + events_to_send = [] # We treat the power levels override specially as this needs to be one # of the first events that get sent into a room. pl_content = initial_state.pop((EventTypes.PowerLevels, ""), None) @@ -1165,7 +1166,7 @@ class RoomCreationHandler: EventTypes.PowerLevels, pl_content, False ) current_state_group = power_context._state_group - await send(power_event, power_context, creator) + events_to_send.append((power_event, power_context)) else: power_level_content: JsonDict = { "users": {creator_id: 100}, @@ -1214,9 +1215,8 @@ class RoomCreationHandler: False, ) current_state_group = pl_context._state_group - await send(pl_event, pl_context, creator) + events_to_send.append((pl_event, pl_context)) - events_to_send = [] if room_alias and (EventTypes.CanonicalAlias, "") not in initial_state: room_alias_event, room_alias_context = await create_event( EventTypes.CanonicalAlias, {"alias": room_alias.to_string()}, True |