Block list is two words

// FREEBIE
pull/1/head
Michael Kirk 9 years ago
parent 694088ee98
commit fcf271f08b

@ -575,7 +575,7 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException";
NSArray<NSString *> *blockedPhoneNumbers = _blockingManager.blockedPhoneNumbers; NSArray<NSString *> *blockedPhoneNumbers = _blockingManager.blockedPhoneNumbers;
if ([blockedPhoneNumbers containsObject:recipientContactId]) { if ([blockedPhoneNumbers containsObject:recipientContactId]) {
DDLogInfo(@"%@ skipping 1:1 send to blocked contact: %@", self.tag, recipientContactId); DDLogInfo(@"%@ skipping 1:1 send to blocked contact: %@", self.tag, recipientContactId);
NSError *error = OWSErrorMakeMessageSendFailedToBlocklistError(); NSError *error = OWSErrorMakeMessageSendFailedToBlockListError();
// No need to retry - the user will continue to be blocked. // No need to retry - the user will continue to be blocked.
failureHandler(error, NO); failureHandler(error, NO);
return; return;

@ -22,7 +22,7 @@ typedef NS_ENUM(NSInteger, OWSErrorCode) {
OWSErrorCodeUserError = 2001, OWSErrorCodeUserError = 2001,
OWSErrorCodeNoSuchSignalRecipient = 777404, OWSErrorCodeNoSuchSignalRecipient = 777404,
OWSErrorCodeMessageSendDisabledDueToPreKeyUpdateFailures = 777405, OWSErrorCodeMessageSendDisabledDueToPreKeyUpdateFailures = 777405,
OWSErrorCodeMessageSendFailedToBlocklist = 777406, OWSErrorCodeMessageSendFailedToBlockList = 777406,
}; };
extern NSError *OWSErrorWithCodeDescription(OWSErrorCode code, NSString *description); extern NSError *OWSErrorWithCodeDescription(OWSErrorCode code, NSString *description);
@ -31,6 +31,6 @@ extern NSError *OWSErrorMakeFailedToSendOutgoingMessageError();
extern NSError *OWSErrorMakeNoSuchSignalRecipientError(); extern NSError *OWSErrorMakeNoSuchSignalRecipientError();
extern NSError *OWSErrorMakeAssertionError(); extern NSError *OWSErrorMakeAssertionError();
extern NSError *OWSErrorMakeMessageSendDisabledDueToPreKeyUpdateFailuresError(); extern NSError *OWSErrorMakeMessageSendDisabledDueToPreKeyUpdateFailuresError();
extern NSError *OWSErrorMakeMessageSendFailedToBlocklistError(); extern NSError *OWSErrorMakeMessageSendFailedToBlockListError();
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

@ -47,10 +47,10 @@ NSError *OWSErrorMakeMessageSendDisabledDueToPreKeyUpdateFailuresError()
@"Error mesage indicating that message send is disabled due to prekey update failures")); @"Error mesage indicating that message send is disabled due to prekey update failures"));
} }
NSError *OWSErrorMakeMessageSendFailedToBlocklistError() NSError *OWSErrorMakeMessageSendFailedToBlockListError()
{ {
return OWSErrorWithCodeDescription(OWSErrorCodeMessageSendFailedToBlocklist, return OWSErrorWithCodeDescription(OWSErrorCodeMessageSendFailedToBlockList,
NSLocalizedString(@"ERROR_DESCRIPTION_MESSAGE_SEND_FAILED_DUE_TO_BLOCKLIST", NSLocalizedString(@"ERROR_DESCRIPTION_MESSAGE_SEND_FAILED_DUE_TO_BLOCK_LIST",
@"Error mesage indicating that message send failed due to block list")); @"Error mesage indicating that message send failed due to block list"));
} }

Loading…
Cancel
Save