From c425aa9493a027c40f38ecd1a57df089c4a99647 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Fri, 12 Oct 2018 15:53:52 -0600 Subject: [PATCH] dont rotate profile keys for unregistered user --- SignalMessaging/profiles/OWSProfileManager.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SignalMessaging/profiles/OWSProfileManager.m b/SignalMessaging/profiles/OWSProfileManager.m index 3b94b2b26..a90bc5f3d 100644 --- a/SignalMessaging/profiles/OWSProfileManager.m +++ b/SignalMessaging/profiles/OWSProfileManager.m @@ -576,6 +576,11 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error); failure:(ProfileManagerFailureBlock)failure { OWSAssertDebug(AppReadiness.isAppReady); + if (!self.tsAccountManager.isRegistered) { + success(); + return; + } + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ NSMutableSet *whitelistedRecipientIds = [NSMutableSet new]; NSMutableSet *whitelistedGroupIds = [NSMutableSet new];