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]; return [self.tsAccountManager updateAccountAttributes];
}); });
// Fetch local profile.
promise = promise.then(^(id value) {
[self fetchLocalUsersProfile];
return @(1);
});
promise = promise.then(^(id value) { promise = promise.then(^(id value) {
[[NSNotificationCenter defaultCenter] postNotificationNameAsync:kNSNotificationName_ProfileKeyDidChange [[NSNotificationCenter defaultCenter] postNotificationNameAsync:kNSNotificationName_ProfileKeyDidChange
object:nil object:nil

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

Loading…
Cancel
Save