mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd:Ⓜ️ Reenable the other other (sic) m::room::members iteration.
This commit is contained in:
parent
9ac16d14d4
commit
25ce5e76a6
1 changed files with 16 additions and 18 deletions
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue