0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-25 23:14:13 +01:00

modules/s_fetch: Enable recursive fetch.

This commit is contained in:
Jason Volk 2019-04-11 08:08:47 -07:00
parent 7794a92159
commit ebdbc0864c
3 changed files with 9 additions and 11 deletions

View file

@ -11143,6 +11143,7 @@ console_cmd__fed__event(opt &out, const string_view &line)
m::vm::opts vmopts;
vmopts.non_conform.set(m::event::conforms::MISSING_PREV_STATE);
vmopts.prev_check_exists = true;
vmopts.prev_wait = true;
vmopts.state_must_exist = true;
vmopts.history = false;
vmopts.notify = false;

View file

@ -72,7 +72,6 @@ handle_pdus(client &client,
{
m::vm::opts vmopts;
vmopts.non_conform.set(m::event::conforms::MISSING_PREV_STATE);
vmopts.prev_check_exists = false;
vmopts.nothrows = -1U;
vmopts.infolog_accept = true;
vmopts.warnlog |= m::vm::fault::STATE;

View file

@ -143,15 +143,14 @@ ircd::m::fetch::hook_handler(const event &event,
continue;
}
if(!opts.prev_fetch || !opts.prev_wait)
if(opts.prev_must_all_exist)
throw vm::error
{
vm::fault::EVENT, "Missing prev %s in %s in %s",
string_view{prev_id},
json::get<"event_id"_>(*eval.event_),
json::get<"room_id"_>(*eval.event_)
};
if((!opts.prev_fetch || !opts.prev_wait) && opts.prev_must_all_exist)
throw vm::error
{
vm::fault::EVENT, "Missing prev %s in %s in %s",
string_view{prev_id},
json::get<"event_id"_>(*eval.event_),
json::get<"room_id"_>(*eval.event_)
};
if(opts.prev_fetch)
start(prev_id, room_id);
@ -520,7 +519,6 @@ try
};
m::vm::opts opts;
opts.prev_check_exists = false;
opts.infolog_accept = true;
m::vm::eval
{