diff --git a/SignalMessaging/profiles/OWSProfileManager.m b/SignalMessaging/profiles/OWSProfileManager.m index e846fff17..917ca246f 100644 --- a/SignalMessaging/profiles/OWSProfileManager.m +++ b/SignalMessaging/profiles/OWSProfileManager.m @@ -227,6 +227,14 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error); void (^failureBlock)(void) = ^{ OWSLogError(@"Updating service with profile failed."); + // We use a "self-only" contact sync to indicate to desktop + // that we've changed our profile and that it should do a + // profile fetch for "self". + // + // NOTE: We also inform the desktop in the failure case, + // since that _may have_ affected service state. + [self.syncManager syncLocalContact]; + dispatch_async(dispatch_get_main_queue(), ^{ failureBlockParameter(); }); @@ -234,6 +242,11 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error); void (^successBlock)(void) = ^{ OWSLogInfo(@"Successfully updated service with profile."); + // We use a "self-only" contact sync to indicate to desktop + // that we've changed our profile and that it should do a + // profile fetch for "self". + [self.syncManager syncLocalContact]; + dispatch_async(dispatch_get_main_queue(), ^{ successBlockParameter(); });