From ddcee11ed47e48227cbb3bae49cf36dcd57114ba Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Mon, 10 Jun 2024 18:38:42 -0500 Subject: [PATCH] Prefer access key with SEALED_SENDER.UNKNOWN Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> --- ts/util/sendToGroup.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ts/util/sendToGroup.ts b/ts/util/sendToGroup.ts index 9b79b50842..efa4c58ae3 100644 --- a/ts/util/sendToGroup.ts +++ b/ts/util/sendToGroup.ts @@ -1278,10 +1278,11 @@ function getAccessKey( return accessKey || undefined; } - if ( - sealedSender === SEALED_SENDER.UNKNOWN || - sealedSender === SEALED_SENDER.UNRESTRICTED - ) { + if (sealedSender === SEALED_SENDER.UNKNOWN) { + return accessKey || ZERO_ACCESS_KEY; + } + + if (sealedSender === SEALED_SENDER.UNRESTRICTED) { return ZERO_ACCESS_KEY; }