Fix various things from previous commits

pull/15/head
sachaaaaa 7 years ago
parent 886f47b8e7
commit b9dbf11ebc

@ -74,13 +74,13 @@
]);
const preKeyMessage = new textsecure.protobuf.PreKeyBundleMessage({
identityKey,
identityKey: new Uint8Array(identityKey),
deviceId: 1, // TODO: fetch from somewhere
preKeyId: preKey.keyId,
signedKeyId,
preKey: preKey.pubKey,
signedKey: signedKey.pubKey,
signature: signedKey.signature,
preKey: new Uint8Array(preKey.pubKey),
signedKey: new Uint8Array(signedKey.pubKey),
signature: new Uint8Array(signedKey.signature),
});
return preKeyMessage;

@ -116,7 +116,7 @@ OutgoingMessage.prototype = {
if (updateDevices === undefined) {
return this.server.getKeysForNumber(number).then(handleResult);
}
let promise = Promise.resolve();
let promise = Promise.resolve(true);
updateDevices.forEach(device => {
promise = promise.then(() =>
Promise.all([
@ -217,7 +217,7 @@ OutgoingMessage.prototype = {
request: requestMessage
});
const bytes = new Uint8Array(websocketMessage.encode().toArrayBuffer())
bytes.toString(); // print bytes for debugging purposes: can be injected in mock socket server
console.log(bytes.toString()); // print bytes for debugging purposes: can be injected in mock socket server
return bytes;
},
doSendMessage(number, deviceIds, recurse) {

Loading…
Cancel
Save