|
|
@ -1130,28 +1130,36 @@ MessageReceiver.prototype.extend({
|
|
|
|
async innerHandleContentMessage(envelope, plaintext) {
|
|
|
|
async innerHandleContentMessage(envelope, plaintext) {
|
|
|
|
const content = textsecure.protobuf.Content.decode(plaintext);
|
|
|
|
const content = textsecure.protobuf.Content.decode(plaintext);
|
|
|
|
|
|
|
|
|
|
|
|
if (content.preKeyBundleMessage)
|
|
|
|
if (content.preKeyBundleMessage) {
|
|
|
|
await this.savePreKeyBundleMessage(
|
|
|
|
await this.savePreKeyBundleMessage(
|
|
|
|
envelope.source,
|
|
|
|
envelope.source,
|
|
|
|
content.preKeyBundleMessage
|
|
|
|
content.preKeyBundleMessage
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if (content.lokiAddressMessage)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (content.lokiAddressMessage) {
|
|
|
|
return this.handleLokiAddressMessage(
|
|
|
|
return this.handleLokiAddressMessage(
|
|
|
|
envelope,
|
|
|
|
envelope,
|
|
|
|
content.lokiAddressMessage
|
|
|
|
content.lokiAddressMessage
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if (content.syncMessage)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (content.syncMessage) {
|
|
|
|
return this.handleSyncMessage(envelope, content.syncMessage);
|
|
|
|
return this.handleSyncMessage(envelope, content.syncMessage);
|
|
|
|
if (content.dataMessage)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (content.dataMessage) {
|
|
|
|
return this.handleDataMessage(envelope, content.dataMessage);
|
|
|
|
return this.handleDataMessage(envelope, content.dataMessage);
|
|
|
|
if (content.nullMessage)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (content.nullMessage) {
|
|
|
|
return this.handleNullMessage(envelope, content.nullMessage);
|
|
|
|
return this.handleNullMessage(envelope, content.nullMessage);
|
|
|
|
if (content.callMessage)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (content.callMessage) {
|
|
|
|
return this.handleCallMessage(envelope, content.callMessage);
|
|
|
|
return this.handleCallMessage(envelope, content.callMessage);
|
|
|
|
if (content.receiptMessage)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (content.receiptMessage) {
|
|
|
|
return this.handleReceiptMessage(envelope, content.receiptMessage);
|
|
|
|
return this.handleReceiptMessage(envelope, content.receiptMessage);
|
|
|
|
if (content.typingMessage)
|
|
|
|
}
|
|
|
|
|
|
|
|
if (content.typingMessage) {
|
|
|
|
return this.handleTypingMessage(envelope, content.typingMessage);
|
|
|
|
return this.handleTypingMessage(envelope, content.typingMessage);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
},
|
|
|
|
},
|
|
|
|