0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

ircd:Ⓜ️ Reenable the other other (sic) m::room::members iteration.

This commit is contained in:
Jason Volk 2018-02-09 00:03:08 -08:00
parent 9ac16d14d4
commit 25ce5e76a6

View file

@ -554,24 +554,6 @@ const
bool
ircd::m::room::members::until(const event::closure_bool &view)
const
{
const vm::query<vm::where::equal> query
{
{ "room_id", room.room_id },
{ "type", "m.room.member" },
};
return m::vm::until(query, [&view]
(const auto &event)
{
return view(event);
});
}
bool
ircd::m::room::members::until(const string_view &membership,
const event::closure_bool &view)
const
{
const event::id::buf event_id_buf
{
@ -614,6 +596,22 @@ const
});
}
bool
ircd::m::room::members::until(const string_view &membership,
const event::closure_bool &view)
const
{
//TODO: optimize with sequential column strat
return until([&membership, &view](const event &event)
{
if(at<"membership"_>(event) == membership)
if(!view(event))
return false;
return true;
});
}
//
// room::members::origins
//