From a03e2546e5504eabba953f8e0b6be8d5b9ebdade Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 15 Mar 2021 14:54:07 +0100 Subject: [PATCH 1/2] Fix ownership broadcast channel --- www/common/outer/mailbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/outer/mailbox.js b/www/common/outer/mailbox.js index b6d02f6d9..a7d936d25 100644 --- a/www/common/outer/mailbox.js +++ b/www/common/outer/mailbox.js @@ -281,7 +281,7 @@ proxy.mailboxes = { channel: m.channel, noChainPad: true, crypto: crypto, - owners: opts.owners || [ctx.store.proxy.edPublic], + owners: type === 'broadcast' ? [] : (opts.owners || [ctx.store.proxy.edPublic]), lastKnownHash: m.lastKnownHash }; cfg.onConnectionChange = function () {}; // Allow reconnections in chainpad-netflux From 807642151a234a23d56cd16e98e277154332a2c9 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 15 Mar 2021 14:54:21 +0100 Subject: [PATCH 2/2] Fix broadcast deletion race condition --- www/admin/inner.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/www/admin/inner.js b/www/admin/inner.js index d037ee5cd..b680139ae 100644 --- a/www/admin/inner.js +++ b/www/admin/inner.js @@ -995,12 +995,14 @@ define([ return UI.warn(Messages.error); } - // Clear the UI - reset(); - onRefreshBroadcast.fire(); // Only print success if there is no callback - if (!_cb) { UI.log(Messages.saved); } + if (!_cb) { + UI.log(Messages.saved); + // Clear the UI + reset(); + onRefreshBroadcast.fire(); + } }); };