mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
modules/client/createroom: Add default room version conf item; fix create eval.
This commit is contained in:
parent
6abd1a8173
commit
4b961099cc
1 changed files with 15 additions and 2 deletions
|
@ -491,11 +491,17 @@ ircd::m::_create_event(const createroom &c)
|
|||
}
|
||||
};
|
||||
|
||||
static conf::item<std::string> default_version
|
||||
{
|
||||
{ "name", "ircd.m.room.create.version_default" },
|
||||
{ "default", "4" },
|
||||
};
|
||||
|
||||
const json::iov::push _room_version
|
||||
{
|
||||
content,
|
||||
{
|
||||
"room_version", json::value { "4", json::STRING }
|
||||
"room_version", json::value { default_version, json::STRING }
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -504,7 +510,14 @@ ircd::m::_create_event(const createroom &c)
|
|||
at<"room_id"_>(c)
|
||||
};
|
||||
|
||||
commit(room, event, content);
|
||||
m::vm::copts opts;
|
||||
opts.room_version = default_version;
|
||||
m::vm::eval eval
|
||||
{
|
||||
opts
|
||||
};
|
||||
|
||||
eval(room, event, content);
|
||||
return room;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue