Encrypted href

This commit is contained in:
yflory
2019-10-07 18:30:46 +02:00
parent cf0d0e8e4b
commit 5ab3f39fb8
13 changed files with 133 additions and 51 deletions

View File

@@ -38,8 +38,7 @@ define([
var data = oldFo.getFileData(id);
var channel = data.channel;
// XXX encrypted href: we need to be able to change the value here
var datas = manager.findChannel(channel, true);
var datas = manager.findChannel(channel);
// Do not migrate a pad if we already have it, it would create a duplicate
// in the drive
if (datas.length !== 0) {
@@ -50,7 +49,9 @@ define([
// We want to merge an edit pad: check if we have the same channel
// but read-only and upgrade it in that case
datas.forEach(function (pad) {
if (pad.data && !pad.data.href) { pad.data.href = data.href; }
if (pad.data && !pad.data.href) {
pad.userObject.setHref(channel, null, data.href);
}
});
return;
}