Refactoring joining team from link

This commit is contained in:
yflory
2019-12-16 18:36:34 +01:00
parent 4626d036cb
commit 0716014eef
2 changed files with 114 additions and 77 deletions

View File

@@ -44,6 +44,16 @@ var factory = function (Hash, Crypt, Nacl, Scrypt/*, Util, Cred, nThen */) {
};
Invite.getPreviewContent = function (seeds, cb) {
setTimeout(function () {
cb(void 0, {
author: {
displayName: 'Bob',
curvePublic: 'pewpewpew'
},
team: 'CryptPad',
message: 'Hello bob'
});
});
/*
var secrets = Invite.derivePreviewSecrets(seeds);
secrets = secrets;
@@ -84,7 +94,7 @@ var factory = function (Hash, Crypt, Nacl, Scrypt/*, Util, Cred, nThen */) {
'/common/common-hash.js',
'/common/cryptget.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/bower_components/scrypt_async/scrypt-async.min.js',
'/bower_components/scrypt-async/scrypt-async.min.js',
], function (Hash, Crypt /*, Nacl, Scrypt */) {
return factory(Hash, Crypt, window.nacl, window.Scrypt);
});