mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Fix unintended unread notification
This commit is contained in:
@@ -3100,16 +3100,15 @@ export class ConversationModel extends window.Backbone
|
||||
lastMessage
|
||||
);
|
||||
|
||||
const shouldBeUnseen = !options.local && !verified;
|
||||
const timestamp = Date.now();
|
||||
const message: MessageAttributesType = {
|
||||
id: generateGuid(),
|
||||
conversationId: this.id,
|
||||
local: Boolean(options.local),
|
||||
readStatus: shouldBeUnseen ? ReadStatus.Unread : ReadStatus.Read,
|
||||
readStatus: ReadStatus.Read,
|
||||
received_at_ms: timestamp,
|
||||
received_at: incrementMessageCounter(),
|
||||
seenStatus: shouldBeUnseen ? SeenStatus.Unseen : SeenStatus.Unseen,
|
||||
seenStatus: options.local ? SeenStatus.Seen : SeenStatus.Unseen,
|
||||
sent_at: lastMessage,
|
||||
timestamp,
|
||||
type: 'verified-change',
|
||||
@@ -3128,7 +3127,7 @@ export class ConversationModel extends window.Backbone
|
||||
);
|
||||
|
||||
this.trigger('newmessage', model);
|
||||
void this.updateUnread();
|
||||
drop(this.updateUnread());
|
||||
|
||||
const serviceId = this.getServiceId();
|
||||
if (isDirectConversation(this.attributes) && serviceId) {
|
||||
|
||||
Reference in New Issue
Block a user