Update chat clock on group event
This commit is contained in:
parent
fe9996d95f
commit
d60c1d00ed
|
@ -160,6 +160,16 @@ func (m *Messenger) HandleMembershipUpdate(messageState *ReceivedMessageState, c
|
||||||
// Show push notifications when our key is added to members list and chat is Active
|
// Show push notifications when our key is added to members list and chat is Active
|
||||||
showPushNotification = showPushNotification && wasUserAdded
|
showPushNotification = showPushNotification && wasUserAdded
|
||||||
}
|
}
|
||||||
|
maxClockVal := uint64(0)
|
||||||
|
for _, event := range group.Events() {
|
||||||
|
if event.ClockValue > maxClockVal {
|
||||||
|
maxClockVal = event.ClockValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if chat.LastClockValue < maxClockVal {
|
||||||
|
chat.LastClockValue = maxClockVal
|
||||||
|
}
|
||||||
|
|
||||||
// Only create a message notification when the user is added, not when removed
|
// Only create a message notification when the user is added, not when removed
|
||||||
if !chat.Active && wasUserAdded {
|
if !chat.Active && wasUserAdded {
|
||||||
|
|
Loading…
Reference in New Issue