Fix teams APP issue after login redirect

pull/1/head
yflory 4 years ago
parent 2844505593
commit 830739c901

@ -121,6 +121,7 @@ define([
Utils.Feedback = _Feedback;
Utils.LocalStore = _LocalStore;
Utils.UserObject = _UserObject;
Utils.currentPad = currentPad;
AppConfig = _AppConfig;
Test = _Test;
@ -604,7 +605,7 @@ define([
for (var k in additionalPriv) { metaObj.priv[k] = additionalPriv[k]; }
if (cfg.addData) {
cfg.addData(metaObj.priv, Cryptpad, metaObj.user);
cfg.addData(metaObj.priv, Cryptpad, metaObj.user, Utils);
}
sframeChan.event('EV_METADATA_UPDATE', metaObj);

@ -97,9 +97,12 @@ define([
var secret = Hash.getSecrets('team', hash);
cb(null, secret);
};
var addData = function (meta) {
if (!hash) { return; }
meta.teamInviteHash = hash.slice(1);
var addData = function (meta, Cryptpad, user, Utils) {
if (!Utils.currentPad.hash) { return; }
var _hash = Utils.currentPad.hash.replace(/^#/, '');
var parsed = Utils.Hash.parseTypeHash('invite', _hash);
if (parsed.app !== 'invite') { return; }
meta.teamInviteHash = _hash;
};
SFCommonO.start({
getSecrets: getSecrets,

Loading…
Cancel
Save