mirror of
https://github.com/matrix-construct/construct
synced 2025-01-19 19:11:53 +01:00
ircd:Ⓜ️:sync: Fix conditions for non-phased non-initial sync items.
This commit is contained in:
parent
9bab532c3e
commit
aa4147b02a
2 changed files with 9 additions and 6 deletions
|
@ -760,14 +760,14 @@ try
|
||||||
if(!enable)
|
if(!enable)
|
||||||
return false;
|
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
|
// 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)
|
if(data.phased && initial && int64_t(data.range.first) < 0L)
|
||||||
return false;
|
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
|
#ifdef RB_DEBUG
|
||||||
sync::stats stats
|
sync::stats stats
|
||||||
{
|
{
|
||||||
|
|
|
@ -213,8 +213,11 @@ ircd::m::sync::handle_get(client &client,
|
||||||
// Conditions for phased sync for this client
|
// Conditions for phased sync for this client
|
||||||
data.phased =
|
data.phased =
|
||||||
{
|
{
|
||||||
(polylog_phased && args.phased) &&
|
polylog_phased && args.phased &&
|
||||||
(phased_range || initial_sync)
|
(
|
||||||
|
phased_range ||
|
||||||
|
(initial_sync && empty(args.since_token.second))
|
||||||
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
// Start the chunked encoded response.
|
// Start the chunked encoded response.
|
||||||
|
|
Loading…
Add table
Reference in a new issue