From 04dc930e0cf66dfad3a11afce6948c03697906b5 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 11 Apr 2017 17:13:08 -0400 Subject: [PATCH] Rework outgoing message state. // FREEBIE --- src/Messages/OWSMessageSender.m | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/Messages/OWSMessageSender.m b/src/Messages/OWSMessageSender.m index 4d28565ba..41275219f 100644 --- a/src/Messages/OWSMessageSender.m +++ b/src/Messages/OWSMessageSender.m @@ -794,7 +794,6 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException"; if (remainingAttempts == 0) { DDLogWarn( @"%@ Terminal failure to build any device messages. Giving up with exception:%@", self.tag, exception); - [self processException:exception outgoingMessage:message inThread:thread]; NSError *error = OWSErrorMakeFailedToSendOutgoingMessageError(); // Since we've already repeatedly failed to build messages, it's unlikely that repeating the whole process // will succeed. @@ -1195,29 +1194,6 @@ NSString *const OWSMessageSenderRateLimitedException = @"RateLimitedException"; }); } -- (void)processException:(NSException *)exception - outgoingMessage:(TSOutgoingMessage *)message - inThread:(TSThread *)thread -{ - DDLogWarn(@"%@ Got exception: %@", self.tag, exception); - - [self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) { - // TODO: This error message is never created? - TSErrorMessage *errorMessage; - - // TODO: Is this necessary? - // if (message.groupMetaMessage == TSGroupMessageNone) { - // // Only update this with exception if it is not a group message as group - // // messages may except for one group - // // send but not another and the UI doesn't know how to handle that - // [message setMessageState:TSOutgoingMessageStateUnsent]; - // [message saveWithTransaction:transaction]; - // } - - [errorMessage saveWithTransaction:transaction]; - }]; -} - #pragma mark - Logging + (NSString *)tag