diff --git a/Source/ChangeTracker/CBLChangeTracker.m b/Source/ChangeTracker/CBLChangeTracker.m index 74e5b140f..4a3c41656 100644 --- a/Source/ChangeTracker/CBLChangeTracker.m +++ b/Source/ChangeTracker/CBLChangeTracker.m @@ -107,6 +107,9 @@ - (NSString*) changesFeedPath { if ([seq isKindOfClass: [NSArray class]] || [seq isKindOfClass: [NSDictionary class]]) seq = [CBLJSON stringWithJSONObject: seq options: 0 error: nil]; [path appendFormat: @"&since=%@", CBLEscapeURLParam([seq description])]; + } else { + // On first replication we can skip getting deleted docs. (SG enhancement in ver. 1.2) + [path appendString: @"&active_only=true"]; } if (_limit > 0) [path appendFormat: @"&limit=%u", _limit]; @@ -162,6 +165,7 @@ - (NSData*) changesFeedPOSTBody { NSMutableDictionary* post = $mdict({@"feed", self.feed}, {@"heartbeat", @(round(_heartbeat*1000.0))}, {@"style", (_includeConflicts ? @"all_docs" : nil)}, + {@"active_only", (since ? nil : @YES)}, {@"since", since}, {@"limit", (_limit > 0 ? @(_limit) : nil)}, {@"filter", filterName},