Merge branch 'mkirk/fix-whitelist'

pull/1/head
Michael Kirk 8 years ago
commit f8000d86b8

@ -672,8 +672,7 @@ const NSUInteger kOWSProfileManager_MaxAvatarDiameter = 640;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@synchronized(self) @synchronized(self)
{ {
// We just consult the lazy cache, not the db. if ([self isUserInProfileWhitelist:recipientId]) {
if (self.userProfileWhitelistCache[recipientId]) {
return; return;
} }
@ -700,9 +699,8 @@ const NSUInteger kOWSProfileManager_MaxAvatarDiameter = 640;
@synchronized(self) @synchronized(self)
{ {
// We just consult the lazy cache, not the db.
for (NSString *recipientId in recipientIds) { for (NSString *recipientId in recipientIds) {
if (!self.userProfileWhitelistCache[recipientId]) { if (![self isUserInProfileWhitelist:recipientId]) {
[newRecipientIds addObject:recipientId]; [newRecipientIds addObject:recipientId];
} }
} }

Loading…
Cancel
Save