From ba499d79f3c43ea81498bb2bb5bde1bca7e905b8 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 18 Jul 2019 14:07:58 -0300 Subject: [PATCH] Skip storedUuid until we always have a local UUID. --- SignalServiceKit/src/Account/TSAccountManager.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SignalServiceKit/src/Account/TSAccountManager.m b/SignalServiceKit/src/Account/TSAccountManager.m index 3b63d60abe..8b077aa27d 100644 --- a/SignalServiceKit/src/Account/TSAccountManager.m +++ b/SignalServiceKit/src/Account/TSAccountManager.m @@ -286,7 +286,7 @@ NSString *const TSAccountManager_NeedsAccountAttributesUpdateKey = @"TSAccountMa // Cache this since we access this a lot, and once set it will not change. @synchronized(self) { - if (self.cachedUuid == nil) { + if (self.cachedUuid == nil && SSKFeatureFlags.allowUUIDOnlyContacts) { self.cachedUuid = self.storedUuid; } @@ -296,6 +296,8 @@ NSString *const TSAccountManager_NeedsAccountAttributesUpdateKey = @"TSAccountMa - (nullable NSUUID *)storedUuid { + OWSAssertDebug(SSKFeatureFlags.allowUUIDOnlyContacts); + @synchronized(self) { __block NSUUID *_Nullable result; [self.databaseStorage readWithBlock:^(SDSAnyReadTransaction *transaction) {