diff --git a/include/ircd/m/sync.h b/include/ircd/m/sync.h index 3fb2f32f2..efa480bdf 100644 --- a/include/ircd/m/sync.h +++ b/include/ircd/m/sync.h @@ -52,6 +52,7 @@ struct ircd::m::sync::item json::strung feature; json::object opts; bool phased; + bool initial; public: string_view name() const; diff --git a/ircd/m.cc b/ircd/m.cc index 91fc36d6b..b3588aa23 100644 --- a/ircd/m.cc +++ b/ircd/m.cc @@ -861,6 +861,10 @@ ircd::m::sync::item::item(std::string name, { opts.get("phased", false) } +,initial +{ + opts.get("initial", false) +} { log::debug { @@ -891,7 +895,11 @@ try return false; // Skip the item for phased-sync ranges if it's not phased-sync aware. - if(!phased && data.phased) + if(data.phased && !phased && !initial) + return false; + + // Skip the item for phased-sync ranges after initial sync if it has initial=true + if(data.phased && initial && int64_t(data.range.first) < 0L) return false; #ifdef RB_DEBUG diff --git a/modules/client/sync/account_data.cc b/modules/client/sync/account_data.cc index 74c95feb3..c1e9ea42e 100644 --- a/modules/client/sync/account_data.cc +++ b/modules/client/sync/account_data.cc @@ -28,7 +28,10 @@ ircd::m::sync::account_data { "account_data", account_data_polylog, - account_data_linear + account_data_linear, + { + { "initial", true } + } }; bool