From 3a646528fedbad1ca0ce1c6dc9a76c729568dc98 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 23 Jul 2019 10:38:34 -0300 Subject: [PATCH] Don't sync verification states before registration. --- SignalServiceKit/src/Messages/OWSIdentityManager.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SignalServiceKit/src/Messages/OWSIdentityManager.m b/SignalServiceKit/src/Messages/OWSIdentityManager.m index 40a0ee91ac..28218ed1f8 100644 --- a/SignalServiceKit/src/Messages/OWSIdentityManager.m +++ b/SignalServiceKit/src/Messages/OWSIdentityManager.m @@ -597,6 +597,10 @@ NSString *const kNSNotificationName_IdentityStateDidChange = @"kNSNotificationNa - (void)syncQueuedVerificationStates { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + if (!self.tsAccountManager.isRegisteredAndReady) { + OWSLogInfo(@"Skipping sync of verification states; not registered."); + return; + } TSThread *_Nullable thread = [TSAccountManager getOrCreateLocalThreadWithSneakyTransaction]; if (thread == nil) { OWSFailDebug(@"Missing thread.");