From d422c7e165b58e3e525ad170de4487768443b94f Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 16 Mar 2017 17:14:54 +0100 Subject: [PATCH] support old hashes in getUserChannelList --- www/common/cryptpad-common.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 5519916e5..f6e51a35e 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -1017,6 +1017,14 @@ define([ parsed = common.parseHash(parsed.hash); + if (parsed.version === 0) { + return channel; + } else if (parsed.version !== 1) { + console.error("parsed href had no version"); + console.error(parsed); + return; + } + var channel = parsed.channel; if (!channel) { return; } @@ -1024,7 +1032,7 @@ define([ return hex; }).filter(function (x) { return x; }); - list.push(userChannel); + list.push(common.base64ToHex(userChannel)); list.sort(); return list;