0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd:Ⓜ️:sync: Fix conditions for non-phased non-initial sync items.

This commit is contained in:
Jason Volk 2019-08-11 08:06:45 -07:00
parent 9bab532c3e
commit aa4147b02a
2 changed files with 9 additions and 6 deletions

View file

@ -760,14 +760,14 @@ try
if(!enable)
return false;
// Skip the item for phased-sync ranges if it's not phased-sync aware.
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;
// Skip the item for phased-sync ranges if it's not phased-sync aware.
if(data.phased && !phased && int64_t(data.range.first) < 0L)
return false;
#ifdef RB_DEBUG
sync::stats stats
{

View file

@ -213,8 +213,11 @@ ircd::m::sync::handle_get(client &client,
// Conditions for phased sync for this client
data.phased =
{
(polylog_phased && args.phased) &&
(phased_range || initial_sync)
polylog_phased && args.phased &&
(
phased_range ||
(initial_sync && empty(args.since_token.second))
)
};
// Start the chunked encoded response.