From 592544819eaffc07658f78cf950c4411b25080d7 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 5 Jun 2019 15:32:32 +0200 Subject: [PATCH] Fix unfriend bug --- www/common/common-messenger.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/www/common/common-messenger.js b/www/common/common-messenger.js index 188f03147..6b9784913 100644 --- a/www/common/common-messenger.js +++ b/www/common/common-messenger.js @@ -612,6 +612,15 @@ define([ cb(); }); }); + } else { + removeFromFriendList(curvePublic, function () { + delete channels[channel.id]; + emit('UNFRIEND', { + curvePublic: curvePublic, + fromMe: true + }); + cb(); + }); } channel.wc.bcast(cryptMsg).then(function () {}, function (err) { console.error(err);