mirror of
https://github.com/matrix-construct/construct
synced 2024-11-28 17:52:54 +01:00
ircd:Ⓜ️:room::create: Implement room_alias_name in initial room creation.
This commit is contained in:
parent
92ca127f54
commit
77cd8832c1
1 changed files with 22 additions and 0 deletions
|
@ -136,6 +136,28 @@ try
|
|||
};
|
||||
}
|
||||
|
||||
// initial m.room.canonical_alias (room_alias_name)
|
||||
|
||||
if(json::get<"room_alias_name"_>(c)) try
|
||||
{
|
||||
const id::room_alias::buf canonical_alias
|
||||
{
|
||||
json::get<"room_alias_name"_>(c), origin(my())
|
||||
};
|
||||
|
||||
send(room, creator, "m.room.canonical_alias", "",
|
||||
{
|
||||
{ "alias", canonical_alias }
|
||||
});
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
report_error
|
||||
{
|
||||
errors, room_id, creator, "Failed to set room_alias_name: %s", e.what()
|
||||
};
|
||||
}
|
||||
|
||||
// initial join_rules
|
||||
|
||||
const string_view &join_rule
|
||||
|
|
Loading…
Reference in a new issue