Send call messages with conversationJobQueue

Co-authored-by: trevor-signal <trevor@signal.org>
This commit is contained in:
Scott Nonnenberg 2024-04-16 14:55:09 -07:00 committed by GitHub
parent 72169820eb
commit 783c71999a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 457 additions and 392 deletions

View file

@ -1722,11 +1722,11 @@ export default class MessageSender {
async sendCallingMessage(
serviceId: ServiceIdString,
callingMessage: Readonly<Proto.ICallingMessage>,
timestamp: number,
urgent: boolean,
options?: Readonly<SendOptionsType>
): Promise<CallbackResultType> {
const recipients = [serviceId];
const finalTimestamp = Date.now();
const contentMessage = new Proto.Content();
contentMessage.callingMessage = callingMessage;
@ -1736,13 +1736,13 @@ export default class MessageSender {
addPniSignatureMessageToProto({
conversation,
proto: contentMessage,
reason: `sendCallingMessage(${finalTimestamp})`,
reason: `sendCallingMessage(${timestamp})`,
});
const { ContentHint } = Proto.UnidentifiedSenderMessage.Message;
return this.sendMessageProtoAndWait({
timestamp: finalTimestamp,
timestamp,
recipients,
proto: contentMessage,
contentHint: ContentHint.DEFAULT,