Merge branch 'charlesmchen/syncVerificationVsRegistration'

This commit is contained in:
Matthew Chen 2019-07-24 09:40:14 -03:00
commit a765e6d519

View File

@ -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.");