Fix preKeyBundle not sending.

pull/50/head
Mikunj 6 years ago
parent 110387508f
commit b21a7197f7

@ -219,12 +219,16 @@ OutgoingMessage.prototype = {
return this.plaintext;
},
async wrapInWebsocketMessage(outgoingObject) {
const preKeyEnvelope = outgoingObject.preKeyBundleMessage ? {
preKeyBundleMessage: outgoingObject.preKeyBundleMessage,
} : {};
const messageEnvelope = new textsecure.protobuf.Envelope({
type: outgoingObject.type,
source: outgoingObject.ourKey,
sourceDevice: outgoingObject.sourceDevice,
timestamp: this.timestamp,
content: outgoingObject.content,
...preKeyEnvelope,
});
const requestMessage = new textsecure.protobuf.WebSocketRequestMessage({
id: new Uint8Array(libsignal.crypto.getRandomBytes(1))[0], // random ID for now

@ -24,7 +24,7 @@ message Envelope {
optional bytes content = 8; // Contains an encrypted Content
optional string serverGuid = 9;
optional uint64 serverTimestamp = 10;
optional PreKeyBundleMessage preKeyBundleMessage = 101;
optional bytes preKeyBundleMessage = 101;
}

Loading…
Cancel
Save