From 24982e6a2ae1296d55d420f805d5eb4b1135260d Mon Sep 17 00:00:00 2001 From: Zuzanna Date: Thu, 5 Mar 2026 15:51:15 +0100 Subject: [PATCH 1/2] #2220 check for other users present now before upload initiates --- www/common/onlyoffice/inner.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index bb81114d9..c3c820648 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -2733,15 +2733,24 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null }); }; - var importFile = function(content) { - // Abort if there is another real user in the channel (history keeper excluded) + // Abort if there is another real user in the channel (history keeper excluded) + var checkChannelUsers = function () { var m = metadataMgr.getChannelMembers().slice().filter(function (nId) { return nId.length === 32; }); if (m.length > 1) { UI.removeModals(); - return void UI.alert(Messages.oo_cantUpload); + UI.alert(Messages.oo_cantUpload); + return true; } + }; + + var importFile = function(content) { + + if (checkChannelUsers()) { + return; + } + if (!content) { UI.removeModals(); return void UI.alert(Messages.oo_invalidFormat); @@ -2782,6 +2791,10 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null if (!supportsXLSX()) { return void UI.alert(Messages.oo_invalidFormat); } + if (checkChannelUsers()) { + return; + } + var div = h('div.cp-oo-x2tXls', [ Icons.get('loading'), h('span', Messages.oo_importInProgress) From c902940f1a7a5d10bbf211ddfcc28306ea9a7487 Mon Sep 17 00:00:00 2001 From: Zuzanna Date: Thu, 5 Mar 2026 16:07:25 +0100 Subject: [PATCH 2/2] removed redundant newlines --- www/common/onlyoffice/inner.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index c3c820648..1cc933977 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -2746,11 +2746,9 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null }; var importFile = function(content) { - if (checkChannelUsers()) { return; } - if (!content) { UI.removeModals(); return void UI.alert(Messages.oo_invalidFormat);