0
0
Fork 0
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:
Jason Volk 2019-08-18 05:59:18 -07:00
parent 19c2d7da8e
commit 163fda95e0

View file

@ -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"