From ff97c2cf63b293dedb5d20a863b0be392dd31079 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 21 Feb 2020 17:10:50 +0100 Subject: [PATCH] Add (copy) to the title for copied pads --- www/common/cryptpad-common.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 6fb2aefd6..3f362a146 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -543,7 +543,7 @@ define([ }); }; - var fixPadMetadata = function (parsed) { + var fixPadMetadata = function (parsed, copy) { var meta; if (Array.isArray(parsed) && typeof(parsed[3]) === "object") { meta = parsed[3].metadata; // pad @@ -554,6 +554,9 @@ define([ } if (typeof(meta) === "object") { meta.defaultTitle = meta.title || meta.defaultTitle; + if (copy) { + meta.defaultTitle = Messages._getKey('copy_title', [meta.defaultTitle]); + } meta.title = ""; delete meta.users; delete meta.chat2; @@ -628,7 +631,7 @@ define([ } try { val = JSON.parse(_val); - fixPadMetadata(val); + fixPadMetadata(val, true); } catch (e) { _waitFor.abort(); return void cb();