From ced24e655beb511fae94d8047fa3559cd202dc9a Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 3 Dec 2024 16:34:10 +0100 Subject: [PATCH] Fix API issues --- lib/hk-util.js | 2 +- www/common/outer/async-store.js | 2 +- www/cryptpad-api.js | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/hk-util.js b/lib/hk-util.js index 2ba656376..61374d7a4 100644 --- a/lib/hk-util.js +++ b/lib/hk-util.js @@ -135,7 +135,7 @@ const expireChannel = HK.expireChannel = function (Env, channel) { }; const removeChannel = HK.removeChannel = function (Env, channel) { - if (!Env.store) { return; } + if (!Env.store) { return; } Env.store.archiveChannel(channel, void 0, () => {}); delete Env.metadata_cache[channel]; delete Env.channel_cache[channel]; diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index f4568dbc9..6e37a97c2 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -1843,7 +1843,7 @@ define([ Store.leavePad(null, data, function () {}); }; var conf = { - Cache: store.neverCache ? undefined : Cache, // ICE pad cache + Cache: store.neverCache ? undefined : Cache, onCacheStart: function () { postMessage(clientId, "PAD_CACHE"); }, diff --git a/www/cryptpad-api.js b/www/cryptpad-api.js index 6fd6d3be4..c398cdb54 100644 --- a/www/cryptpad-api.js +++ b/www/cryptpad-api.js @@ -113,7 +113,7 @@ }; var start = function () { - config.document.key = key; + //config.document.key = key; chan.send('START', { key: key, application: config.documentType, @@ -137,6 +137,7 @@ blob = config.document.blob; return start(); } + // XXX Nextcloud will log us out if we try from the client getBlob(function (err, _blob) { if (err) { // Can't get blob from client, try from server console.warn(err);