0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-25 15:04:10 +01:00

modules/client/publicrooms: Convey search term to any federation query.

This commit is contained in:
Jason Volk 2020-05-29 01:39:25 -07:00
parent 761ff66464
commit d9cf74ebd6
3 changed files with 9 additions and 3 deletions

View file

@ -49,7 +49,8 @@ struct ircd::m::rooms::summary::fetch
// request
fetch(const string_view &origin,
const string_view &since = {},
const size_t &limit = 64);
const size_t &limit = 64,
const string_view &search = {});
fetch() = default;
};

View file

@ -67,12 +67,14 @@ ircd::m::rooms::summary::fetch::limit
ircd::m::rooms::summary::fetch::fetch(const string_view &origin,
const string_view &since,
const size_t &limit)
const size_t &limit,
const string_view &search_term)
{
m::fed::public_rooms::opts opts;
opts.limit = limit;
opts.since = since;
opts.include_all_networks = true;
opts.search_term = search_term;
const unique_buffer<mutable_buffer> buf
{
// Buffer for headers and send content; received content is dynamic

View file

@ -101,7 +101,10 @@ get__publicrooms(client &client,
{
m::rooms::summary::fetch
{
server, since, limit
server,
since,
limit,
search_term
};
}
catch(const std::exception &e)