Fix last data received ts if message ts is higher than current time

This commit is contained in:
Tulir Asokan 2024-04-11 16:34:57 +03:00
parent 86f06804b8
commit 584bc31896

View file

@ -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()).