From 403b3c5fc613dc117b5a09fb58f73e03d0a7918f Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 17 May 2021 10:57:47 -0700 Subject: [PATCH] getSendOptions: Disable sealed sender whenever sending to own account --- ts/textsecure/OutgoingMessage.ts | 2 +- ts/util/getSendOptions.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/textsecure/OutgoingMessage.ts b/ts/textsecure/OutgoingMessage.ts index 2a1ddd051958..0b3d023255f5 100644 --- a/ts/textsecure/OutgoingMessage.ts +++ b/ts/textsecure/OutgoingMessage.ts @@ -430,7 +430,7 @@ export default class OutgoingMessage { const sealedSender = Boolean(accessKey && senderCertificate); - // We don't send to ourselves if unless sealedSender is enabled + // We don't send to ourselves unless sealedSender is enabled const ourNumber = window.textsecure.storage.user.getNumber(); const ourUuid = window.textsecure.storage.user.getUuid(); const ourDeviceId = window.textsecure.storage.user.getDeviceId(); diff --git a/ts/util/getSendOptions.ts b/ts/util/getSendOptions.ts index a9596b0e2293..e23d8da0419c 100644 --- a/ts/util/getSendOptions.ts +++ b/ts/util/getSendOptions.ts @@ -50,8 +50,8 @@ export async function getSendOptions( const { accessKey, sealedSender } = conversationAttrs; - // We never send sync messages as sealed sender - if (syncMessage && isMe(conversationAttrs)) { + // We never send sync messages or to our own account as sealed sender + if (syncMessage || isMe(conversationAttrs)) { return { sendMetadata: undefined, };