Only create notifications for unread messages

In some cases, we have already received a read receipt for an incoming
message by the time we go to create a notification about it. In this
case, we should skip the notification.

// FREEBIE
pull/749/head
lilia 9 years ago
parent 11e84846bf
commit e07616e2ef

@ -357,7 +357,9 @@
message.save().then(function() {
conversation.save().then(function() {
conversation.trigger('newmessage', message);
conversation.notify(message);
if (message.get('unread')) {
conversation.notify(message);
}
resolve();
});
});

Loading…
Cancel
Save