From 53112a62cc3bfd9989acab518e69eeb27938117a Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 17 Dec 2020 14:49:53 +0000 Subject: [PATCH] Rely on positions from notifier rather than manually advancing them --- syncapi/storage/shared/syncserver.go | 1 - syncapi/sync/requestpool.go | 1 - 2 files changed, 2 deletions(-) diff --git a/syncapi/storage/shared/syncserver.go b/syncapi/storage/shared/syncserver.go index 6fe0f4314..48be098fb 100644 --- a/syncapi/storage/shared/syncserver.go +++ b/syncapi/storage/shared/syncserver.go @@ -629,7 +629,6 @@ func (d *Database) addReceiptDeltaToResponse( } read.User[receipt.UserID] = eduAPI.ReceiptTS{TS: receipt.Timestamp} content[receipt.EventID] = read - res.NextBatch.ReceiptPosition++ } ev.Content, err = json.Marshal(content) if err != nil { diff --git a/syncapi/sync/requestpool.go b/syncapi/sync/requestpool.go index c3637f177..df3f86091 100644 --- a/syncapi/sync/requestpool.go +++ b/syncapi/sync/requestpool.go @@ -325,7 +325,6 @@ func (rp *RequestPool) currentSyncForUser(req syncRequest, latestPos types.Strea // Add the updates into the sync response. for _, event := range events { res.ToDevice.Events = append(res.ToDevice.Events, event.SendToDeviceEvent) - res.NextBatch.SendToDevicePosition++ } }