mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 15:30:52 +01:00
modules/client/createroom: Implement 13^h^h14.23.3 Server behaviour.
This commit is contained in:
parent
380032d4a9
commit
86ddcd7149
1 changed files with 10 additions and 1 deletions
|
@ -339,8 +339,17 @@ try
|
||||||
|
|
||||||
for(const json::string &_user_id : json::get<"invite"_>(c)) try
|
for(const json::string &_user_id : json::get<"invite"_>(c)) try
|
||||||
{
|
{
|
||||||
|
json::iov content;
|
||||||
|
const json::iov::add is_direct // Conditionally add is_direct
|
||||||
|
{
|
||||||
|
content, json::get<"is_direct"_>(c),
|
||||||
|
{
|
||||||
|
"is_direct", []() -> json::value { return json::literal_true; }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const m::user::id &user_id{_user_id};
|
const m::user::id &user_id{_user_id};
|
||||||
invite(room, user_id, creator);
|
invite(room, user_id, creator, content);
|
||||||
}
|
}
|
||||||
catch(const std::exception &e)
|
catch(const std::exception &e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue