mirror of
https://github.com/matrix-construct/construct
synced 2024-10-04 06:38:58 +02:00
ircd:Ⓜ️:rooms: Add summary iteration based on alias hosts.
This commit is contained in:
parent
e4a95c9928
commit
9eae6be223
1 changed files with 16 additions and 0 deletions
|
@ -137,6 +137,22 @@ ircd::m::rooms::for_each(const opts &opts,
|
|||
}});
|
||||
}
|
||||
|
||||
// branch for optimized public rooms searches.
|
||||
if(opts.summary && opts.server)
|
||||
{
|
||||
m::room::aliases::cache::for_each(opts.server, [&proffer, &ret]
|
||||
(const auto &alias, const auto &room_id)
|
||||
{
|
||||
if(!m::rooms::summary::has(room_id))
|
||||
return true;
|
||||
|
||||
proffer(room_id);
|
||||
return ret;
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// branch for optimized public rooms searches.
|
||||
if(opts.summary)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue