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
|
if not options then
|
||||||
options = {}
|
options = {}
|
||||||
end
|
end
|
||||||
|
if not options.since then
|
||||||
options.since = self._sync_next_batch
|
options.since = self._sync_next_batch
|
||||||
|
end
|
||||||
self._log("sync: Requesting with next_batch = %s", options.since)
|
self._log("sync: Requesting with next_batch = %s", options.since)
|
||||||
|
|
||||||
local response = self._api:sync(options)
|
local response = self._api:sync(options)
|
||||||
|
|||||||
Reference in New Issue
Block a user