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:
parent
9007f651ed
commit
11dd47a8aa
3 changed files with 11 additions and 4 deletions
|
@ -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;
|
||||
|
|
10
ircd/m.cc
10
ircd/m.cc
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue