From 23e48a6b4f181ebbc8c36230adff8a3938ea57f0 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 7 Jun 2019 13:44:52 +0200 Subject: [PATCH 1/2] Fix messenger unable to send messages --- www/common/messenger-ui.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/messenger-ui.js b/www/common/messenger-ui.js index bd77d80ff..c78ca6db4 100644 --- a/www/common/messenger-ui.js +++ b/www/common/messenger-ui.js @@ -618,8 +618,10 @@ define([ }; var onLeave = function (obj) { var channel = obj.id; + var chan = state.channels[channel]; var data = obj.info; - if (contactsData[data.curvePublic]) { + // XXX Teams: if someone leaves a room, don't remove their data if they're also a friend + if (contactsData[data.curvePublic] && !(chan && chan.isFriendChat)) { delete contactsData[data.curvePublic]; } updateStatus(channel); From 02c765b0852b068f26c44c121bc0104475e8c42a Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 7 Jun 2019 15:50:00 +0200 Subject: [PATCH 2/2] lint compliance --- www/common/common-messenger.js | 2 +- www/common/sframe-common-mailbox.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/common-messenger.js b/www/common/common-messenger.js index 5330281ae..0138eb528 100644 --- a/www/common/common-messenger.js +++ b/www/common/common-messenger.js @@ -961,7 +961,7 @@ define([ cb({error:err}); }); channel.messages = []; - } + }; network.on('disconnect', function () { emit('DISCONNECT'); diff --git a/www/common/sframe-common-mailbox.js b/www/common/sframe-common-mailbox.js index 665f8d7be..814966a22 100644 --- a/www/common/sframe-common-mailbox.js +++ b/www/common/sframe-common-mailbox.js @@ -52,7 +52,7 @@ define([ var dismissIcon = h('span.fa.fa-times'); var dismiss = h('div.cp-notification-dismiss', { title: Messages.notifications_dismiss - }, dismissIcon) + }, dismissIcon); dismiss.addEventListener('click', function (e) { e.preventDefault(); e.stopPropagation();