mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
modules/s_fetch: Enable recursive fetch.
This commit is contained in:
parent
7794a92159
commit
ebdbc0864c
3 changed files with 9 additions and 11 deletions
|
@ -11143,6 +11143,7 @@ console_cmd__fed__event(opt &out, const string_view &line)
|
||||||
m::vm::opts vmopts;
|
m::vm::opts vmopts;
|
||||||
vmopts.non_conform.set(m::event::conforms::MISSING_PREV_STATE);
|
vmopts.non_conform.set(m::event::conforms::MISSING_PREV_STATE);
|
||||||
vmopts.prev_check_exists = true;
|
vmopts.prev_check_exists = true;
|
||||||
|
vmopts.prev_wait = true;
|
||||||
vmopts.state_must_exist = true;
|
vmopts.state_must_exist = true;
|
||||||
vmopts.history = false;
|
vmopts.history = false;
|
||||||
vmopts.notify = false;
|
vmopts.notify = false;
|
||||||
|
|
|
@ -72,7 +72,6 @@ handle_pdus(client &client,
|
||||||
{
|
{
|
||||||
m::vm::opts vmopts;
|
m::vm::opts vmopts;
|
||||||
vmopts.non_conform.set(m::event::conforms::MISSING_PREV_STATE);
|
vmopts.non_conform.set(m::event::conforms::MISSING_PREV_STATE);
|
||||||
vmopts.prev_check_exists = false;
|
|
||||||
vmopts.nothrows = -1U;
|
vmopts.nothrows = -1U;
|
||||||
vmopts.infolog_accept = true;
|
vmopts.infolog_accept = true;
|
||||||
vmopts.warnlog |= m::vm::fault::STATE;
|
vmopts.warnlog |= m::vm::fault::STATE;
|
||||||
|
|
|
@ -143,15 +143,14 @@ ircd::m::fetch::hook_handler(const event &event,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!opts.prev_fetch || !opts.prev_wait)
|
if((!opts.prev_fetch || !opts.prev_wait) && opts.prev_must_all_exist)
|
||||||
if(opts.prev_must_all_exist)
|
throw vm::error
|
||||||
throw vm::error
|
{
|
||||||
{
|
vm::fault::EVENT, "Missing prev %s in %s in %s",
|
||||||
vm::fault::EVENT, "Missing prev %s in %s in %s",
|
string_view{prev_id},
|
||||||
string_view{prev_id},
|
json::get<"event_id"_>(*eval.event_),
|
||||||
json::get<"event_id"_>(*eval.event_),
|
json::get<"room_id"_>(*eval.event_)
|
||||||
json::get<"room_id"_>(*eval.event_)
|
};
|
||||||
};
|
|
||||||
|
|
||||||
if(opts.prev_fetch)
|
if(opts.prev_fetch)
|
||||||
start(prev_id, room_id);
|
start(prev_id, room_id);
|
||||||
|
@ -520,7 +519,6 @@ try
|
||||||
};
|
};
|
||||||
|
|
||||||
m::vm::opts opts;
|
m::vm::opts opts;
|
||||||
opts.prev_check_exists = false;
|
|
||||||
opts.infolog_accept = true;
|
opts.infolog_accept = true;
|
||||||
m::vm::eval
|
m::vm::eval
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue