0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-05 01:58:35 +02:00

ircd:Ⓜ️:rooms: Add summary iteration based on alias hosts.

This commit is contained in:
Jason Volk 2019-09-13 17:48:35 -07:00
parent e4a95c9928
commit 9eae6be223

View file

@ -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)
{