From 6c6ce7b7a852d67d7eb6b07d4f890106c3a690f9 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 11 Sep 2018 17:42:00 +0200 Subject: [PATCH] Fix messenger bugs --- www/common/common-messenger.js | 1 + www/contacts/messenger-ui.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/common-messenger.js b/www/common/common-messenger.js index 99d9d3e6a..fb6bebf69 100644 --- a/www/common/common-messenger.js +++ b/www/common/common-messenger.js @@ -435,6 +435,7 @@ define([ return null; } }).filter(function (decrypted) { + if (decrypted.d && decrypted.d[0] !== Types.message) { return; } return decrypted; }).map(function (O) { return { diff --git a/www/contacts/messenger-ui.js b/www/contacts/messenger-ui.js index c466ebe60..69675b3e5 100644 --- a/www/contacts/messenger-ui.js +++ b/www/contacts/messenger-ui.js @@ -499,7 +499,6 @@ define([ }; messenger.on('message', function (message) { - common.notify(); var chanId = message.channel; var chat = getChat(chanId); @@ -514,6 +513,7 @@ define([ console.error('expected channel [%s] to be open', chanId); return; } + common.notify(); channel.messages.push(message);