Add parens and line breaks
// FREEBIE
This commit is contained in:
parent
b1c933ccd4
commit
e9bc39bc56
2 changed files with 22 additions and 8 deletions
|
@ -38899,13 +38899,20 @@ var TextSecureServer = (function() {
|
||||||
registerKeys: function(genKeys) {
|
registerKeys: function(genKeys) {
|
||||||
var keys = {};
|
var keys = {};
|
||||||
keys.identityKey = btoa(getString(genKeys.identityKey));
|
keys.identityKey = btoa(getString(genKeys.identityKey));
|
||||||
keys.signedPreKey = {keyId: genKeys.signedPreKey.keyId, publicKey: btoa(getString(genKeys.signedPreKey.publicKey)),
|
keys.signedPreKey = {
|
||||||
signature: btoa(getString(genKeys.signedPreKey.signature))};
|
keyId: genKeys.signedPreKey.keyId,
|
||||||
|
publicKey: btoa(getString(genKeys.signedPreKey.publicKey)),
|
||||||
|
signature: btoa(getString(genKeys.signedPreKey.signature))
|
||||||
|
};
|
||||||
|
|
||||||
keys.preKeys = [];
|
keys.preKeys = [];
|
||||||
var j = 0;
|
var j = 0;
|
||||||
for (var i in genKeys.preKeys)
|
for (var i in genKeys.preKeys) {
|
||||||
keys.preKeys[j++] = {keyId: genKeys.preKeys[i].keyId, publicKey: btoa(getString(genKeys.preKeys[i].publicKey))};
|
keys.preKeys[j++] = {
|
||||||
|
keyId: genKeys.preKeys[i].keyId,
|
||||||
|
publicKey: btoa(getString(genKeys.preKeys[i].publicKey))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
//TODO: This is just to make the server happy (v2 clients should choke on publicKey),
|
//TODO: This is just to make the server happy (v2 clients should choke on publicKey),
|
||||||
// it needs removed before release
|
// it needs removed before release
|
||||||
|
|
|
@ -175,13 +175,20 @@ var TextSecureServer = (function() {
|
||||||
registerKeys: function(genKeys) {
|
registerKeys: function(genKeys) {
|
||||||
var keys = {};
|
var keys = {};
|
||||||
keys.identityKey = btoa(getString(genKeys.identityKey));
|
keys.identityKey = btoa(getString(genKeys.identityKey));
|
||||||
keys.signedPreKey = {keyId: genKeys.signedPreKey.keyId, publicKey: btoa(getString(genKeys.signedPreKey.publicKey)),
|
keys.signedPreKey = {
|
||||||
signature: btoa(getString(genKeys.signedPreKey.signature))};
|
keyId: genKeys.signedPreKey.keyId,
|
||||||
|
publicKey: btoa(getString(genKeys.signedPreKey.publicKey)),
|
||||||
|
signature: btoa(getString(genKeys.signedPreKey.signature))
|
||||||
|
};
|
||||||
|
|
||||||
keys.preKeys = [];
|
keys.preKeys = [];
|
||||||
var j = 0;
|
var j = 0;
|
||||||
for (var i in genKeys.preKeys)
|
for (var i in genKeys.preKeys) {
|
||||||
keys.preKeys[j++] = {keyId: genKeys.preKeys[i].keyId, publicKey: btoa(getString(genKeys.preKeys[i].publicKey))};
|
keys.preKeys[j++] = {
|
||||||
|
keyId: genKeys.preKeys[i].keyId,
|
||||||
|
publicKey: btoa(getString(genKeys.preKeys[i].publicKey))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
//TODO: This is just to make the server happy (v2 clients should choke on publicKey),
|
//TODO: This is just to make the server happy (v2 clients should choke on publicKey),
|
||||||
// it needs removed before release
|
// it needs removed before release
|
||||||
|
|
Loading…
Reference in a new issue