From 279eb890236bb2d3bf24ee055654adb506f353b0 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Wed, 23 Aug 2017 11:25:31 -0400 Subject: [PATCH] Fix whitelist whitelist cache are a bunch of NSNumber's, we need to check their boolValue // FREEBIE --- Signal/src/Profiles/OWSProfileManager.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Signal/src/Profiles/OWSProfileManager.m b/Signal/src/Profiles/OWSProfileManager.m index 263a49d6d..730293eaa 100644 --- a/Signal/src/Profiles/OWSProfileManager.m +++ b/Signal/src/Profiles/OWSProfileManager.m @@ -672,8 +672,7 @@ const NSUInteger kOWSProfileManager_MaxAvatarDiameter = 640; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ @synchronized(self) { - // We just consult the lazy cache, not the db. - if (self.userProfileWhitelistCache[recipientId]) { + if ([self isUserInProfileWhitelist:recipientId]) { return; } @@ -700,9 +699,8 @@ const NSUInteger kOWSProfileManager_MaxAvatarDiameter = 640; @synchronized(self) { - // We just consult the lazy cache, not the db. for (NSString *recipientId in recipientIds) { - if (!self.userProfileWhitelistCache[recipientId]) { + if (![self isUserInProfileWhitelist:recipientId]) { [newRecipientIds addObject:recipientId]; } }