0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-18 09:58:22 +02:00

ircd:Ⓜ️:event::append: Support replaces_state in unsigned object.

This commit is contained in:
Jason Volk 2023-02-28 12:17:22 -08:00
parent 91fafda7bb
commit 53ff7e229b

View file

@ -331,6 +331,7 @@ ircd::m::event::append::append(json::stack::object &object,
});
if(prev_state_idx)
{
m::get(std::nothrow, prev_state_idx, "content", [&unsigned_]
(const json::object &content)
{
@ -340,6 +341,22 @@ ircd::m::event::append::append(json::stack::object &object,
};
});
const auto replaces_state_id
{
m::event_id(std::nothrow, prev_state_idx)
};
json::stack::member
{
unsigned_, "replaces_state", json::value
{
replaces_state_id?
string_view{replaces_state_id}:
string_view{}
}
};
}
if(unlikely(event_append_info))
log::info
{