mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Inform linked devices about profile changes.
This commit is contained in:
parent
338364eff1
commit
ac051fc89e
1 changed files with 13 additions and 0 deletions
|
@ -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();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue