Remove messages from notifications when read

Remove individual messages from Notifications when marked read.
Previously this was only done from the conversation model when marking
the entire conversation as read.

Fixes #717

// FREEBIE
This commit is contained in:
lilia 2016-03-08 12:02:47 -08:00
commit 0763cf14a3
2 changed files with 5 additions and 1 deletions

View file

@ -403,7 +403,8 @@
message : message.getNotificationText(),
iconUrl : iconUrl,
imageUrl : message.getImageUrl(),
conversationId : conversationId
conversationId : conversationId,
messageId : message.id
});
});
});

View file

@ -367,6 +367,9 @@
},
markRead: function(sync) {
this.unset('unread');
Whisper.Notifications.remove(Whisper.Notifications.where({
messageId: this.id
}));
return this.save();
}