mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-29 15:39:00 +03:00
When creating a room and a user supplies a room_alias but no name, use the room_alias as the name.
This commit is contained in:
parent
6322aa154b
commit
dce6395395
1 changed files with 11 additions and 0 deletions
|
@ -136,6 +136,17 @@ class RoomCreationHandler(BaseRoomHandler):
|
|||
content={"name": name},
|
||||
)
|
||||
|
||||
yield handle_event(name_event)
|
||||
elif room_alias:
|
||||
name = room_alias.to_string()
|
||||
name_event = self.event_factory.create_event(
|
||||
etype=RoomNameEvent.TYPE,
|
||||
room_id=room_id,
|
||||
user_id=user_id,
|
||||
required_power_level=5,
|
||||
content={"name": name},
|
||||
)
|
||||
|
||||
yield handle_event(name_event)
|
||||
|
||||
if "topic" in config:
|
||||
|
|
Loading…
Reference in a new issue