From 267ccaefdf9ad8f093ad2f277e78b8791ae119ca Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 27 Feb 2024 18:34:48 +0100 Subject: [PATCH] New support: fix sharedworker issue --- lib/env.js | 2 +- www/common/outer/support.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/env.js b/lib/env.js index 0d2acefda..35eded23d 100644 --- a/lib/env.js +++ b/lib/env.js @@ -374,7 +374,7 @@ module.exports.create = function (config) { try { let moderators = require('./commands/moderators').getKeysSync(Env); Env.moderators = moderators.map(safeKey => { - return Util.unescapeKeyCharacters(safeKey);; + return Util.unescapeKeyCharacters(safeKey); }) || []; } catch (e) { console.log(e); diff --git a/www/common/outer/support.js b/www/common/outer/support.js index 0ca60eee0..d0af8b92f 100644 --- a/www/common/outer/support.js +++ b/www/common/outer/support.js @@ -59,7 +59,7 @@ define([ // Get the content of a ticket mailbox and close it var getContent = function (ctx, data, isAdmin, _cb) { - var cb = Util.once(Util.both(close, Util.mkAsync(_cb))); + var cb = Util.once(Util.mkAsync(_cb)); var theirPublic, myCurve; nThen((waitFor) => { getKeys(ctx, isAdmin, data, waitFor((err, obj) => { @@ -87,6 +87,7 @@ define([ if (typeof(cpNf.stop) !== "function") { return; } cpNf.stop(); }; + cb = Util.both(close, cb); cfg.onMessage = function (msg, user, vKey, isCp, hash, author, data) { var time = data && data.time; try { @@ -102,7 +103,6 @@ define([ cfg.onChannelError = cb; cfg.onReady = function () { cb(null, all); - close(); }; cpNf = CpNetflux.start(cfg); });