Allow power_level_content_override=None for _send_events_for_new_room

This commit is contained in:
Richard van der Hoff 2018-10-25 17:50:06 +01:00
parent 7f7b2cd3de
commit e1948175ee
1 changed files with 6 additions and 5 deletions

View File

@ -204,7 +204,7 @@ class RoomCreationHandler(BaseHandler):
initial_state=initial_state, initial_state=initial_state,
creation_content=creation_content, creation_content=creation_content,
room_alias=room_alias, 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, creator_join_profile=creator_join_profile,
) )
@ -282,9 +282,9 @@ class RoomCreationHandler(BaseHandler):
invite_list, invite_list,
initial_state, initial_state,
creation_content, creation_content,
room_alias, room_alias=None,
power_level_content_override, power_level_content_override=None,
creator_join_profile, creator_join_profile=None,
): ):
def create(etype, content, **kwargs): def create(etype, content, **kwargs):
e = { e = {
@ -364,7 +364,8 @@ class RoomCreationHandler(BaseHandler):
for invitee in invite_list: for invitee in invite_list:
power_level_content["users"][invitee] = 100 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( yield send(
etype=EventTypes.PowerLevels, etype=EventTypes.PowerLevels,