From 4a7b02c2b8cd0e37ea7ef1fe89072b8768578d44 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Thu, 7 Jul 2022 18:26:11 +0100 Subject: [PATCH] Document arguments to _send_events_for_new_room method --- synapse/handlers/room.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 14189b98e8..e7e35735ce 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -1003,8 +1003,25 @@ class RoomCreationHandler: ) -> int: """Sends the initial events into a new room. - `power_level_content_override` doesn't apply when initial state has - power level state event content. + Args: + creator: The requester of the room creation. + room_id: The ID of the room to send events in. + preset_config: The identifier of the room preset to use. This + determines what events are sent into the room. + invite_list: A list of Matrix user IDs to invite to the room. This is only + used by the method to set the power levels of the invitees to 100 if + the preset for the room specifies that initial invitees should have ops. + initial_state: A map of state key to an event definition or event ID. + creation_content: A json dict to use as the value of the "content" field + for the room's create event. + room_alias: A room alias to link to the room, if provided. + power_level_content_override: A json dictionary that specifies the initial + power levels of the room. If 'initial_state' contains a m.room.power_levels + event then this argument will be ignored. + creator_join_profile: The value of the "content" field for the m.room.membership + join event that will be sent for the creator of the room. + ratelimit: Whether to ratelimit the join event of the room creator. + TODO: Why is this ever True??? Would this leave us with a broken room? Returns: The stream_id of the last event persisted.