Make :sync() always add a "since" query parameter if available
...which ensures that multiple consecutive requests to /sync paginate properly.
This commit is contained in:
@@ -435,7 +435,9 @@ function Client:_sync(options)
|
||||
if not options then
|
||||
options = {}
|
||||
end
|
||||
options.since = self._sync_next_batch
|
||||
if not options.since then
|
||||
options.since = self._sync_next_batch
|
||||
end
|
||||
self._log("sync: Requesting with next_batch = %s", options.since)
|
||||
|
||||
local response = self._api:sync(options)
|
||||
|
||||
Reference in New Issue
Block a user