diff --git a/include/ircd/m/room/messages.h b/include/ircd/m/room/messages.h index d8ec10dd6..bbccdeea7 100644 --- a/include/ircd/m/room/messages.h +++ b/include/ircd/m/room/messages.h @@ -25,7 +25,7 @@ namespace ircd::m // have been obtained at that depth. Each gap is reported to the closure // with a separate invocation. The range is [inclusive, exclusive]. using depth_range = std::pair; - using depth_range_closure = std::function; + using depth_range_closure = std::function; bool for_each_depth_gap(const room &, const depth_range_closure &); bool rfor_each_depth_gap(const room &, const depth_range_closure &); std::pair is_complete(const room &); diff --git a/modules/console.cc b/modules/console.cc index e9ebba9b8..4bc5c9e8c 100644 --- a/modules/console.cc +++ b/modules/console.cc @@ -7436,7 +7436,7 @@ console_cmd__room__depth__gaps(opt &out, const string_view &line) }; const auto closure{[&out] - (const auto &range) + (const auto &range, const auto &event_idx) { out << std::right << std::setw(8) << range.first << " : " diff --git a/modules/m_room.cc b/modules/m_room.cc index 709eacc36..765e59b6b 100644 --- a/modules/m_room.cc +++ b/modules/m_room.cc @@ -519,7 +519,7 @@ ircd::m::rfor_each_depth_gap(const room &room, if(range.first == range.second) continue; - if(!closure({range.first+1, range.second+1})) + if(!closure({range.first+1, range.second+1}, it.event_idx())) return false; range.second = range.first; @@ -548,7 +548,7 @@ ircd::m::for_each_depth_gap(const room &room, if(range.first == range.second) continue; - if(!closure(range)) + if(!closure(range, it.event_idx())) return false; range.first = range.second;