From 6abd1a81737d3c8852d0cae7bdc39a77fda78bef Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 13 Jul 2019 17:23:50 -0700 Subject: [PATCH] modules/m_fetch: Fix prev array counting calls. --- modules/m_fetch.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/m_fetch.cc b/modules/m_fetch.cc index 0ebc8c4d7..6759b8003 100644 --- a/modules/m_fetch.cc +++ b/modules/m_fetch.cc @@ -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