mirror of
https://github.com/matrix-construct/construct
synced 2024-11-18 16:00:57 +01:00
ircd:Ⓜ️:room::create: Add an initial local aliases event with the canonical alias.
This commit is contained in:
parent
ce6b4496b3
commit
5d7a4e4b36
1 changed files with 11 additions and 1 deletions
|
@ -141,11 +141,21 @@ try
|
|||
|
||||
if(json::get<"room_alias_name"_>(c)) try
|
||||
{
|
||||
const id::room_alias::buf canonical_alias
|
||||
const id::room_alias::buf canonical_alias_buf
|
||||
{
|
||||
json::get<"room_alias_name"_>(c), origin(my())
|
||||
};
|
||||
|
||||
const json::value canonical_alias
|
||||
{
|
||||
canonical_alias_buf
|
||||
};
|
||||
|
||||
send(room, creator, "m.room.aliases", origin(my()),
|
||||
{
|
||||
{ "aliases", json::value { &canonical_alias, 1 } }
|
||||
});
|
||||
|
||||
send(room, creator, "m.room.canonical_alias", "",
|
||||
{
|
||||
{ "alias", canonical_alias }
|
||||
|
|
Loading…
Reference in a new issue