From 463fc45b2a14f36a813d42dc24719da1c6166bf0 Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Tue, 9 Apr 2024 15:00:12 +0200 Subject: [PATCH] #1089: Contextual menu `open` on anonymous drive - Related to https://github.com/cryptpad/cryptpad/issues/1089#issuecomment-2044954222 --- www/common/drive-ui.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 65ded1fb8..0434a7fdd 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -1201,7 +1201,8 @@ define([ // falsy (open in preview if default is not using the app) var defaultInApp = ['application/pdf']; var openFile = function (el, isRo, app) { - var data = manager.getFileData(el); + // On anonymous drive, `el` already contains file data + var data = el.channel ? el : manager.getFileData(el); if (data.static) { if (data.href) {