again: Don't send empty message to self after changing disappearing (#54)

timer

previously fixed in: 91fcd01632

But got lost in a rebase after moving TSMessagesManager+sendMessage to
OWSMessageSender.

// FREEBIE
pull/1/head
Michael Kirk 9 years ago committed by GitHub
parent b6676fb029
commit 9c426e0a4b

@ -549,6 +549,14 @@ NSString *const OWSMessageSenderInvalidDeviceException = @"InvalidDeviceExceptio
- (void)handleSendToMyself:(TSOutgoingMessage *)outgoingMessage
{
[self handleMessageSentLocally:outgoingMessage];
if (!(outgoingMessage.body || outgoingMessage.hasAttachments)) {
DDLogDebug(
@"%@ Refusing to make incoming copy of non-standard message sent to self:%@", self.tag, outgoingMessage);
return;
}
[self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
TSContactThread *cThread =
[TSContactThread getOrCreateThreadWithContactId:[TSAccountManager localNumber] transaction:transaction];
@ -562,7 +570,6 @@ NSString *const OWSMessageSenderInvalidDeviceException = @"InvalidDeviceExceptio
expiresInSeconds:outgoingMessage.expiresInSeconds];
[incomingMessage saveWithTransaction:transaction];
}];
[self handleMessageSentLocally:outgoingMessage];
}
- (void)sendSyncTranscriptForMessage:(TSOutgoingMessage *)message

Loading…
Cancel
Save