mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
modules/m_vm_fetch: Prevent recursive backfill out of handler; remove viewport condition.
This commit is contained in:
parent
dfdee1eac9
commit
51c6620e2c
1 changed files with 2 additions and 20 deletions
|
@ -385,6 +385,8 @@ ircd::m::vm::fetch::prev(const event &event,
|
|||
json::object(result).get("pdus")
|
||||
};
|
||||
|
||||
auto opts(*eval.opts);
|
||||
opts.fetch_prev = false;
|
||||
log::debug
|
||||
{
|
||||
log, "%s fetched %zu pdus; evaluating...",
|
||||
|
@ -445,26 +447,6 @@ ircd::m::vm::fetch::prev_fetch(const event &event,
|
|||
if(m::exists(prev_id))
|
||||
continue;
|
||||
|
||||
const bool recent_event
|
||||
{
|
||||
at<"depth"_>(event) >= viewport_depth
|
||||
};
|
||||
|
||||
if(!recent_event)
|
||||
{
|
||||
log::dwarning
|
||||
{
|
||||
log, "%s no action for missing prev %s; depth:%ld room:%ld viewport:%ld",
|
||||
loghead(eval),
|
||||
string_view{prev_id},
|
||||
at<"depth"_>(event),
|
||||
room_depth,
|
||||
viewport_depth,
|
||||
};
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
const long depth_gap
|
||||
{
|
||||
std::max(std::abs(at<"depth"_>(event) - room_depth), 1L)
|
||||
|
|
Loading…
Reference in a new issue