Move the parseHash code into parsePadUrl

This commit is contained in:
yflory
2017-05-12 16:33:45 +02:00
parent e0293a1162
commit 0f13198119
7 changed files with 125 additions and 61 deletions

View File

@@ -22,7 +22,8 @@ define([
};
var makeConfig = function (hash) {
var secret = Cryptpad.getSecrets(hash);
// We can't use cryptget with a file or a user so we can use 'pad' as hash type
var secret = Cryptpad.getSecrets('pad', hash);
if (!secret.keys) { secret.keys = secret.key; } // support old hashses
var config = {
websocketURL: Cryptpad.getWebsocketURL(),