Block list is two words

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

@ -167,7 +167,7 @@ NSString *const kOWSBlockingManager_SyncedBlockedPhoneNumbersKey = @"kOWSBlockin
if (sendSyncMessage) { if (sendSyncMessage) {
[self sendBlockedPhoneNumbersMessage:blockedPhoneNumbers]; [self sendBlockedPhoneNumbersMessage:blockedPhoneNumbers];
} else { } else {
// If this update came from an incoming blocklist sync message, // If this update came from an incoming block list sync message,
// update the "synced blocked phone numbers" state immediately, // update the "synced blocked phone numbers" state immediately,
// since we're now in sync. // since we're now in sync.
// //

@ -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,11 +47,11 @@ 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 blocklist")); @"Error mesage indicating that message send failed due to block list"));
} }
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

Loading…
Cancel
Save