Update local profile after registration and profile key rotation.

pull/1/head
Matthew Chen 7 years ago
parent 9322442881
commit 6d075747c0

@ -737,6 +737,13 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
return [self.tsAccountManager updateAccountAttributes];
});
// Fetch local profile.
promise = promise.then(^(id value) {
[self fetchLocalUsersProfile];
return @(1);
});
promise = promise.then(^(id value) {
[[NSNotificationCenter defaultCenter] postNotificationNameAsync:kNSNotificationName_ProfileKeyDidChange
object:nil

@ -381,6 +381,7 @@ NSString *const TSAccountManager_NeedsAccountAttributesUpdateKey = @"TSAccountMa
OWSLogInfo(@"Verification code accepted.");
[self storeServerAuthToken:authToken signalingKey:signalingKey];
[TSPreKeyManager createPreKeysWithSuccess:successBlock failure:failureBlock];
[self.profileManager fetchLocalUsersProfile];
break;
}
default: {

Loading…
Cancel
Save