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:
parent
7f27cdbf1d
commit
e6320e0716
1 changed files with 7 additions and 5 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue