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

modules/m_fetch: Fix prev array counting calls.

This commit is contained in:
Jason Volk 2019-07-13 17:23:50 -07:00
parent 2489ae02ff
commit 6abd1a8173

View file

@ -180,7 +180,7 @@ ircd::m::fetch::hook_handle_auth(const event &event,
// Count how many of the auth_events provided exist locally.
const auto &opts{*eval.opts};
const event::prev prev{event};
tab.auth_count = size(json::get<"auth_events"_>(prev));
tab.auth_count = prev.auth_events_count();
for(size_t i(0); i < tab.auth_count; ++i)
{
const auto &auth_id
@ -246,7 +246,7 @@ ircd::m::fetch::hook_handle_prev(const event &event,
{
const auto &opts{*eval.opts};
const event::prev prev{event};
tab.prev_count = size(json::get<"prev_events"_>(prev));
tab.prev_count = prev.prev_events_count();
for(size_t i(0); i < tab.prev_count; ++i)
{
const auto &prev_id