Fix crash around account attributes update when unregistered.

pull/1/head
Matthew Chen 7 years ago
parent 9a7f08b70b
commit 4d2bbfc54d

@ -649,6 +649,10 @@ NSString *const TSAccountManager_NeedsAccountAttributesUpdateKey = @"TSAccountMa
}
- (AnyPromise *)updateAccountAttributesIfNecessary {
if (!self.isRegistered) {
return [AnyPromise promiseWithValue:@(1)];
}
NSDate *_Nullable updateRequestDate =
[self.dbConnection objectForKey:TSAccountManager_NeedsAccountAttributesUpdateKey
inCollection:TSAccountManager_UserAccountCollection];

Loading…
Cancel
Save