Revert "Rely on positions from notifier rather than manually advancing them"

This reverts commit 53112a62cc.
This commit is contained in:
Neil Alexander 2020-12-17 15:08:46 +00:00
parent 53112a62cc
commit dcab0654cb
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 2 additions and 0 deletions

View file

@ -629,6 +629,7 @@ 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 {

View file

@ -325,6 +325,7 @@ 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++
}
}