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

Commit

Permalink
Allow power_level_content_override=None for _send_events_for_new_room
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Oct 25, 2018
1 parent 7f7b2cd commit e194817
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions synapse/handlers/room.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def create_room(self, requester, config, ratelimit=True,
initial_state=initial_state,
creation_content=creation_content,
room_alias=room_alias,
power_level_content_override=config.get("power_level_content_override", {}),
power_level_content_override=config.get("power_level_content_override"),
creator_join_profile=creator_join_profile,
)

Expand Down Expand Up @@ -282,9 +282,9 @@ def _send_events_for_new_room(
invite_list,
initial_state,
creation_content,
room_alias,
power_level_content_override,
creator_join_profile,
room_alias=None,
power_level_content_override=None,
creator_join_profile=None,
):
def create(etype, content, **kwargs):
e = {
Expand Down Expand Up @@ -364,7 +364,8 @@ def send(etype, content, **kwargs):
for invitee in invite_list:
power_level_content["users"][invitee] = 100

power_level_content.update(power_level_content_override)
if power_level_content_override:
power_level_content.update(power_level_content_override)

yield send(
etype=EventTypes.PowerLevels,
Expand Down

0 comments on commit e194817

Please sign in to comment.