mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
modules/federation/make_leave: Send room_version in response top level. (#18)
This commit is contained in:
parent
19c2d7da8e
commit
163fda95e0
1 changed files with 15 additions and 0 deletions
|
@ -91,6 +91,12 @@ get__make_leave(client &client,
|
|||
membership
|
||||
};
|
||||
|
||||
char room_version_buf[m::room::VERSION_MAX_SIZE];
|
||||
const string_view &room_version
|
||||
{
|
||||
m::version(room_version_buf, room, std::nothrow)
|
||||
};
|
||||
|
||||
const unique_buffer<mutable_buffer> buf
|
||||
{
|
||||
8_KiB
|
||||
|
@ -98,6 +104,15 @@ get__make_leave(client &client,
|
|||
|
||||
json::stack out{buf};
|
||||
json::stack::object top{out};
|
||||
|
||||
json::stack::member
|
||||
{
|
||||
top, "room_version", json::value
|
||||
{
|
||||
room_version, json::STRING
|
||||
}
|
||||
};
|
||||
|
||||
json::stack::object event
|
||||
{
|
||||
top, "event"
|
||||
|
|
Loading…
Reference in a new issue