From 987d7adc5d4e34827759b206ac4cc17cce78e221 Mon Sep 17 00:00:00 2001 From: Till <2353100+S7evinK@users.noreply.github.com> Date: Sat, 30 Apr 2022 00:07:50 +0200 Subject: [PATCH] Return "to", if we didn't return any presence events (#2407) Return correct stream position, if we didn't return any presence events --- syncapi/streams/stream_presence.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/syncapi/streams/stream_presence.go b/syncapi/streams/stream_presence.go index a84d1987..35ce53cb 100644 --- a/syncapi/streams/stream_presence.go +++ b/syncapi/streams/stream_presence.go @@ -145,6 +145,10 @@ func (p *PresenceStreamProvider) IncrementalSync( p.cache.Store(cacheKey, presence) } + if len(req.Response.Presence.Events) == 0 { + return to + } + return lastPos }