0
0
Fork 0
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:
Jason Volk 2023-02-24 17:56:26 -08:00
parent ce6b4496b3
commit 5d7a4e4b36

View file

@ -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 }