diff --git a/ts/textsecure/SendMessage.ts b/ts/textsecure/SendMessage.ts index 088a5126707..181f735eb78 100644 --- a/ts/textsecure/SendMessage.ts +++ b/ts/textsecure/SendMessage.ts @@ -2362,7 +2362,7 @@ export default class MessageSender { story, urgent, }: Readonly<{ - contentHint: number; + contentHint?: number; distributionId: string; groupId: string | undefined; identifiers: ReadonlyArray; @@ -2373,6 +2373,7 @@ export default class MessageSender { options?: Readonly ): Promise { const timestamp = Date.now(); + const { ContentHint } = Proto.UnidentifiedSenderMessage.Message; const contentMessage = await this.getSenderKeyDistributionMessage( distributionId, { @@ -2384,7 +2385,7 @@ export default class MessageSender { const sendLogCallback = identifiers.length > 1 ? this.makeSendLogCallback({ - contentHint, + contentHint: contentHint ?? ContentHint.IMPLICIT, proto: Buffer.from(Proto.Content.encode(contentMessage).finish()), sendType: 'senderKeyDistributionMessage', timestamp, @@ -2394,7 +2395,7 @@ export default class MessageSender { : undefined; return this.sendGroupProto({ - contentHint, + contentHint: contentHint ?? ContentHint.IMPLICIT, groupId, options, proto: contentMessage, diff --git a/ts/util/handleRetry.ts b/ts/util/handleRetry.ts index b805062620d..29b14002968 100644 --- a/ts/util/handleRetry.ts +++ b/ts/util/handleRetry.ts @@ -297,7 +297,6 @@ async function sendDistributionMessageOrNullMessage( options: RetryRequestEventData, didArchive: boolean ): Promise { - const { ContentHint } = Proto.UnidentifiedSenderMessage.Message; const { groupId, requesterUuid } = options; let sentDistributionMessage = false; log.info(`sendDistributionMessageOrNullMessage/${logId}: Starting...`); @@ -334,7 +333,6 @@ async function sendDistributionMessageOrNullMessage( await handleMessageSend( messaging.sendSenderKeyDistributionMessage( { - contentHint: ContentHint.RESENDABLE, distributionId, groupId, identifiers: [requesterUuid], diff --git a/ts/util/sendToGroup.ts b/ts/util/sendToGroup.ts index 2b38c1978cd..cd2ca2f88cb 100644 --- a/ts/util/sendToGroup.ts +++ b/ts/util/sendToGroup.ts @@ -437,7 +437,7 @@ export async function sendToGroupViaSenderKey(options: { await handleMessageSend( window.textsecure.messaging.sendSenderKeyDistributionMessage( { - contentHint: ContentHint.RESENDABLE, + contentHint, distributionId, groupId, identifiers: newToMemberUuids,