Return "to", if we didn't return any presence events (#2407)

Return correct stream position, if we didn't return any presence events
This commit is contained in:
Till 2022-04-30 00:07:50 +02:00 committed by GitHub
parent 31799a3b2a
commit 987d7adc5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,6 +145,10 @@ func (p *PresenceStreamProvider) IncrementalSync(
p.cache.Store(cacheKey, presence) p.cache.Store(cacheKey, presence)
} }
if len(req.Response.Presence.Events) == 0 {
return to
}
return lastPos return lastPos
} }