Merge branch 'mkirk/fix-profile-crash'

This commit is contained in:
Michael Kirk 2017-08-11 09:16:33 -04:00
commit a90f11490b
1 changed files with 4 additions and 1 deletions

View File

@ -80,7 +80,10 @@ NS_ASSUME_NONNULL_BEGIN
// Once we've shared our profile key with a user (perhaps due to being
// a member of a whitelisted group), make sure they're whitelisted.
id<ProfileManagerProtocol> profileManager = [TextSecureKitEnv sharedEnv].profileManager;
[profileManager addUserToProfileWhitelist:recipientId];
// FIXME PERF avoid this dispatch. It's going to happen for *each* recipient in a group message.
dispatch_async(dispatch_get_main_queue(), ^{
[profileManager addUserToProfileWhitelist:recipientId];
});
}
}