dont rotate profile keys for unregistered user

This commit is contained in:
Michael Kirk 2018-10-12 15:53:52 -06:00
parent b44a5e9d2a
commit c425aa9493
1 changed files with 5 additions and 0 deletions

View File

@ -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<NSString *> *whitelistedRecipientIds = [NSMutableSet new];
NSMutableSet<NSData *> *whitelistedGroupIds = [NSMutableSet new];