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
This commit is contained in:
parent
11e84846bf
commit
e07616e2ef
1 changed files with 3 additions and 1 deletions
|
@ -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…
Reference in a new issue