diff --git a/src/gui/src/UI/UIWindowShare.js b/src/gui/src/UI/UIWindowShare.js index 51d1bba98..dcaedd494 100644 --- a/src/gui/src/UI/UIWindowShare.js +++ b/src/gui/src/UI/UIWindowShare.js @@ -35,11 +35,17 @@ const mode_label = (mode) => { * @param {object} options * @param {string} options.path Item to share. * @param {string} [options.name] Display name; defaults to the path's basename. + * @param {string} [options.owner] Owner's username; defaults to the first path + * segment, which is not the current user when a `manage` recipient opens this. */ async function UIWindowShare (options) { options = options ?? {}; const item_path = options.path; const item_name = options.name ?? path.basename(item_path); + const item_owner = + options.owner + ?? item_path?.split('/').filter(Boolean)[0] + ?? window.user.username; let h = ''; h += '