Use implicit content hint for sender key distribution messages
This commit is contained in:
parent
ca638dd44f
commit
a8ce959405
3 changed files with 5 additions and 6 deletions
|
@ -2362,7 +2362,7 @@ export default class MessageSender {
|
|||
story,
|
||||
urgent,
|
||||
}: Readonly<{
|
||||
contentHint: number;
|
||||
contentHint?: number;
|
||||
distributionId: string;
|
||||
groupId: string | undefined;
|
||||
identifiers: ReadonlyArray<string>;
|
||||
|
@ -2373,6 +2373,7 @@ export default class MessageSender {
|
|||
options?: Readonly<SendOptionsType>
|
||||
): Promise<CallbackResultType> {
|
||||
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,
|
||||
|
|
|
@ -297,7 +297,6 @@ async function sendDistributionMessageOrNullMessage(
|
|||
options: RetryRequestEventData,
|
||||
didArchive: boolean
|
||||
): Promise<void> {
|
||||
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],
|
||||
|
|
|
@ -437,7 +437,7 @@ export async function sendToGroupViaSenderKey(options: {
|
|||
await handleMessageSend(
|
||||
window.textsecure.messaging.sendSenderKeyDistributionMessage(
|
||||
{
|
||||
contentHint: ContentHint.RESENDABLE,
|
||||
contentHint,
|
||||
distributionId,
|
||||
groupId,
|
||||
identifiers: newToMemberUuids,
|
||||
|
|
Loading…
Reference in a new issue