Mark older messages as read when we get out-of-order read receipt

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-06-07 14:34:05 -07:00
parent aeefc530d2
commit 785b117b86
2 changed files with 16 additions and 10 deletions

View file

@ -457,6 +457,10 @@
}
if (readReceipt || message.isExpirationTimerUpdate()) {
message.unset('unread');
// This is primarily to allow the conversation to mark all older messages as
// read, as is done when we receive a read receipt for a message we already
// know about.
Whisper.ReadReceipts.notifyConversation(message);
} else {
conversation.set('unreadCount', conversation.get('unreadCount') + 1);
}