mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 00:02:34 +01:00
modules/client/publicrooms: Convey search term to any federation query.
This commit is contained in:
parent
761ff66464
commit
d9cf74ebd6
3 changed files with 9 additions and 3 deletions
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue