Commit 1675109e authored by JC Brand's avatar JC Brand

Two changes, see below.

- Don't play a sound notification for forwarded messages.
- Bugfix. Return when no chat box returned.
parent ccf908a6
......@@ -3527,11 +3527,13 @@
}
// Get chat box, but only create a new one when the message has a body.
chatbox = this.getChatBox(contact_jid, $message.find('body').length > 0);
if (!chatbox) {
return true;
}
if (msgid && chatbox.messages.findWhere({msgid: msgid})) {
return true; // We already have this message stored.
}
if (!this.isOnlyChatStateNotification($message) && !is_me) {
if (!this.isOnlyChatStateNotification($message) && !is_me && !$forwarded.length) {
converse.playNotification();
}
chatbox.receiveMessage($message, $delay, archive_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment