Fix last data received ts if message ts is higher than current time
This commit is contained in:
parent
86f06804b8
commit
584bc31896
1 changed files with 3 additions and 0 deletions
3
user.go
3
user.go
|
@ -820,6 +820,9 @@ func (user *User) syncHandleEvent(event any) {
|
||||||
case *libgm.WrappedMessage:
|
case *libgm.WrappedMessage:
|
||||||
user.noDataReceivedRecently = false
|
user.noDataReceivedRecently = false
|
||||||
user.lastDataReceived = time.Now()
|
user.lastDataReceived = time.Now()
|
||||||
|
if v.GetTimestamp() > user.lastDataReceived.UnixMicro() {
|
||||||
|
user.lastDataReceived = time.UnixMicro(v.GetTimestamp())
|
||||||
|
}
|
||||||
user.zlog.Debug().
|
user.zlog.Debug().
|
||||||
Str("conversation_id", v.GetConversationID()).
|
Str("conversation_id", v.GetConversationID()).
|
||||||
Str("participant_id", v.GetParticipantID()).
|
Str("participant_id", v.GetParticipantID()).
|
||||||
|
|
Loading…
Reference in a new issue