From 584bc318964b1edd17e881bfcf52debb303d9842 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 11 Apr 2024 16:34:57 +0300 Subject: [PATCH] Fix last data received ts if message ts is higher than current time --- user.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user.go b/user.go index 5c52c6e..97286bb 100644 --- a/user.go +++ b/user.go @@ -820,6 +820,9 @@ func (user *User) syncHandleEvent(event any) { case *libgm.WrappedMessage: user.noDataReceivedRecently = false user.lastDataReceived = time.Now() + if v.GetTimestamp() > user.lastDataReceived.UnixMicro() { + user.lastDataReceived = time.UnixMicro(v.GetTimestamp()) + } user.zlog.Debug(). Str("conversation_id", v.GetConversationID()). Str("participant_id", v.GetParticipantID()).