Owned profile

This commit is contained in:
yflory
2018-03-22 15:16:19 +01:00
parent 9e711e4cd4
commit db9eee383c
2 changed files with 13 additions and 3 deletions

View File

@@ -643,10 +643,19 @@ define([
replaceHash(Utils.Hash.getEditHashFromKeys(wc, secret.keys));
}
};
Object.keys(rtConfig).forEach(function (k) {
cpNfCfg[k] = rtConfig[k];
nThen(function (waitFor) {
if (isNewFile && cfg.owned && !window.location.hash) {
Cryptpad.getMetadata(waitFor(function (err, m) {
cpNfCfg.owners = [m.priv.edPublic];
}));
}
}).nThen(function () {
Object.keys(rtConfig).forEach(function (k) {
cpNfCfg[k] = rtConfig[k];
});
CpNfOuter.start(cpNfCfg);
});
CpNfOuter.start(cpNfCfg);
};
sframeChan.on('Q_CREATE_PAD', function (data, cb) {