From c7005df406d02d05f4abc63eeb6a549fca76fca7 Mon Sep 17 00:00:00 2001 From: Max Radermacher Date: Mon, 1 Jun 2026 12:50:30 -0500 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20send=20reactive=20profile=20key?= =?UTF-8?q?s=20for=20groups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Messages/OWSMessageDecrypter.swift | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/SignalServiceKit/Messages/OWSMessageDecrypter.swift b/SignalServiceKit/Messages/OWSMessageDecrypter.swift index b318a694a4..0dcf200200 100644 --- a/SignalServiceKit/Messages/OWSMessageDecrypter.swift +++ b/SignalServiceKit/Messages/OWSMessageDecrypter.swift @@ -528,29 +528,10 @@ public class OWSMessageDecrypter { let needsReactiveProfileKeyMessage: Bool = db.read { transaction in // This user is whitelisted, they should have our profile key / be sending UD messages // Send them our profile key in case they somehow lost it. - if - profileManager.isUser( - inProfileWhitelist: SignalServiceAddress(sourceAci), - transaction: transaction, - ) - { - return true - } - - // If we're in a V2 group with this user, they should also have our profile key / - // be sending UD messages. Send them it in case they somehow lost it. - var needsReactiveProfileKeyMessage = false - TSGroupThread.enumerateGroupThreads( - with: SignalServiceAddress(sourceAci), + return profileManager.isUser( + inProfileWhitelist: SignalServiceAddress(sourceAci), transaction: transaction, - ) { thread, stop in - guard thread.isGroupV2Thread else { return } - guard thread.groupModel.groupMembership.isLocalUserFullMember else { return } - guard !thread.isTerminatedGroup else { return } - stop = true - needsReactiveProfileKeyMessage = true - } - return needsReactiveProfileKeyMessage + ) } if needsReactiveProfileKeyMessage {