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:
parent
0b8f1c0a9f
commit
e1ca32e89a
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue