From 0b50cea0c2f9b3c0205c76804d83bc2fbaafc938 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 5 May 2022 13:00:42 +0100 Subject: [PATCH] Put that back --- syncapi/sync/requestpool.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/syncapi/sync/requestpool.go b/syncapi/sync/requestpool.go index 101476574..6669171c3 100644 --- a/syncapi/sync/requestpool.go +++ b/syncapi/sync/requestpool.go @@ -229,6 +229,9 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *userapi. } } + rp.updateLastSeen(req, device) + rp.updatePresence(req.Context(), rp.db, req.FormValue("set_presence"), device.UserID) + activeSyncRequests.Inc() defer activeSyncRequests.Dec() @@ -265,9 +268,6 @@ func (rp *RequestPool) OnIncomingSyncRequest(req *http.Request, device *userapi. syncReq.Log.WithField("currentPos", currentPos).Debugln("Responding to sync immediately") } - defer rp.updateLastSeen(req, device) - rp.updatePresence(req.Context(), rp.db, req.FormValue("set_presence"), device.UserID) - if syncReq.Since.IsEmpty() { // Complete sync syncReq.Response.NextBatch = types.StreamingToken{