Fix registerKeys using array indices for key ids
preKeys is an array whose indices may or may not be keyId-based. Since we have an inline keyId property, use that instead.
This commit is contained in:
parent
00989962d8
commit
7af42a27c5
2 changed files with 2 additions and 2 deletions
|
@ -39239,7 +39239,7 @@ window.textsecure.api = function () {
|
|||
keys.preKeys = [];
|
||||
var j = 0;
|
||||
for (var i in genKeys.preKeys)
|
||||
keys.preKeys[j++] = {keyId: i, 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),
|
||||
// it needs removed before release
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue