From b12e93076ea8b25065d16e9c760550a5a016ede3 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 3 Apr 2017 14:45:09 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20block=20outgoing=20group=20mess?= =?UTF-8?q?ages.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // FREEBIE --- src/Messages/OWSMessageSender.m | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/Messages/OWSMessageSender.m b/src/Messages/OWSMessageSender.m index e45e2a1c7..7be6a6206 100644 --- a/src/Messages/OWSMessageSender.m +++ b/src/Messages/OWSMessageSender.m @@ -632,33 +632,16 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException"; [self saveGroupMessage:message inThread:thread]; NSMutableArray *futures = [NSMutableArray array]; - NSArray *blockedPhoneNumbers = _blockingManager.blockedPhoneNumbers; - int blockedCount = 0; for (SignalRecipient *rec in recipients) { // We don't need to send the message to ourselves... if ([rec.uniqueId isEqualToString:[TSStorageManager localNumber]]) { continue; } - // ...or to anyone on our blocklist... - OWSAssert(rec.uniqueId.length > 0); - if ([blockedPhoneNumbers containsObject:rec.uniqueId]) { - DDLogInfo(@"%@ skipping group send to blocked contact: %@", self.tag, rec.uniqueId); - blockedCount++; - continue; - } // ...otherwise we send. [futures addObject:[self sendMessageFuture:message recipient:rec thread:thread]]; } - // If all recipients in the group are in our blocklist, - // there's nothing to do. - if (blockedCount > 0 && futures.count == 0) { - NSError *error = OWSErrorMakeMessageSendFailedToBlocklistError(); - failureHandler(error); - return; - } - TOCFuture *completionFuture = futures.toc_thenAll; [completionFuture thenDo:^(id value) {