0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-21 03:51:56 +01:00

ircd:Ⓜ️:create: Fix m.room.create content.type conflict w/ user provided content.

This commit is contained in:
Jason Volk 2023-02-12 18:43:13 -08:00
parent 0b8f1c0a9f
commit e1ca32e89a

View file

@ -433,9 +433,14 @@ ircd::m::_create_event(const createroom &c)
{ content, { "creator", creator }},
};
const bool add_creation_type
{
!type.empty() && type != "room" && !user_content.has("type")
};
const json::iov::add _type
{
content, !type.empty() && type != "room",
content, add_creation_type,
{
"type", [&type]() -> json::value
{