diff --git a/www/common/common-messenger.js b/www/common/common-messenger.js index 814a050ed..9868e0266 100644 --- a/www/common/common-messenger.js +++ b/www/common/common-messenger.js @@ -962,7 +962,7 @@ define([ cb({error:err}); }); channel.messages = []; - } + }; network.on('disconnect', function () { emit('DISCONNECT'); diff --git a/www/common/messenger-ui.js b/www/common/messenger-ui.js index 9c325d7b8..682535d98 100644 --- a/www/common/messenger-ui.js +++ b/www/common/messenger-ui.js @@ -617,8 +617,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); 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();