Calling support

This commit is contained in:
Peter Thatcher 2020-06-04 11:16:19 -07:00 committed by Scott Nonnenberg
parent 83574eb067
commit d3a27a6442
72 changed files with 3864 additions and 191 deletions

View file

@ -9,6 +9,7 @@ import OutgoingMessage from './OutgoingMessage';
import Crypto from './Crypto';
import {
AttachmentPointerClass,
CallingMessageClass,
ContentClass,
DataMessageClass,
} from '../textsecure.d';
@ -892,6 +893,28 @@ export default class MessageSender {
);
}
async sendCallingMessage(
recipientId: string,
callingMessage: CallingMessageClass,
sendOptions: SendOptionsType
) {
const recipients = [recipientId];
const finalTimestamp = Date.now();
const contentMessage = new window.textsecure.protobuf.Content();
contentMessage.callingMessage = callingMessage;
const silent = true;
await this.sendMessageProtoAndWait(
finalTimestamp,
recipients,
contentMessage,
silent,
sendOptions
);
}
async sendDeliveryReceipt(
recipientE164: string,
recipientUuid: string,