From 5b006a8819fbc1af947f0375e82fafc4b5b2a4b6 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 20 Sep 2019 16:38:04 +0200 Subject: [PATCH] Fix roster.stop --- www/common/outer/roster.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/common/outer/roster.js b/www/common/outer/roster.js index 7d2092b73..ae07f9b1c 100644 --- a/www/common/outer/roster.js +++ b/www/common/outer/roster.js @@ -407,8 +407,8 @@ var factory = function (Util, Hash, CPNetflux, Sortify, nThen, Crypto) { var webChannel; roster.stop = function () { - if (webChannel && typeof(webChannel.leave) === 'function') { - webChannel.leave(); + if (ref.internal.cpNetflux && typeof(ref.internal.cpNetflux) === "function") { + ref.internal.cpNetflux.stop(); clearPendingCheckpoints(); } else { console.log("FAILED TO LEAVE"); @@ -643,7 +643,7 @@ var factory = function (Util, Hash, CPNetflux, Sortify, nThen, Crypto) { console.log("Synchronizing from checkpoint"); } - CPNetflux.start({ + ref.internal.cpNetflux = CPNetflux.start({ // if you don't have a lastKnownHash you will need the full history // passing -1 forces the server to send all messages, otherwise // malicious users with the signing key could send cp| messages