0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

modules/federation/state: Seek an event_id before starting chunked encoding to allow 404.

This commit is contained in:
Jason Volk 2019-03-22 21:57:18 -07:00
parent 7f27cdbf1d
commit e6320e0716

View file

@ -68,6 +68,13 @@ get__state(client &client,
room
};
const m::event::auth::chain ac
{
event_id?
m::index(event_id):
m::head_idx(room)
};
resource::response::chunked response
{
client, http::OK
@ -101,11 +108,6 @@ get__state(client &client,
top, "auth_chain"
};
const m::event::auth::chain ac
{
m::index(event_id)
};
m::event::fetch event;
ac.for_each([&auth_chain, &event]
(const m::event::idx &event_idx)