0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd:Ⓜ️:sync: Add pointer to struct args in struct data.

This commit is contained in:
Jason Volk 2019-07-07 19:55:56 -07:00
parent 9007f651ed
commit 11dd47a8aa
3 changed files with 11 additions and 4 deletions

View file

@ -90,6 +90,7 @@ struct ircd::m::sync::data
/// The client. This may be null if sync is being called internally.
ircd::client *client {nullptr};
const sync::args *args {nullptr};
// User related
const m::user user;
@ -116,7 +117,7 @@ struct ircd::m::sync::data
ircd::client *const &client = nullptr,
json::stack *const &out = nullptr,
sync::stats *const &stats = nullptr,
const string_view &filter_id = {});
const sync::args *const &args = nullptr);
data(data &&) = delete;
data(const data &) = delete;

View file

@ -1110,7 +1110,7 @@ ircd::m::sync::data::data(const m::user &user,
ircd::client *const &client,
json::stack *const &out,
sync::stats *const &stats,
const string_view &filter_id)
const sync::args *const &args)
:range
{
range
@ -1123,6 +1123,10 @@ ircd::m::sync::data::data(const m::user &user,
{
client
}
,args
{
args
}
,user
{
user
@ -1141,7 +1145,9 @@ ircd::m::sync::data::data(const m::user &user,
}
,filter_buf
{
m::filter::get(filter_id, user)
this->args?
m::filter::get(this->args->filter_id, user):
{}
}
,filter
{

View file

@ -218,7 +218,7 @@ ircd::m::sync::handle_get(client &client,
&client,
nullptr,
&stats,
args.filter_id
&args,
};
// Determine if this is an initial-sync request.