Don't send empty message to self after changing disappearing timer

fixes #1393

// FREEBIE
pull/1/head
Michael Kirk 9 years ago
parent f83f808986
commit 91fcd01632

@ -389,6 +389,14 @@ dispatch_queue_t sendingQueue() {
- (void)handleSendToMyself:(TSOutgoingMessage *)outgoingMessage - (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.logTag, outgoingMessage);
return;
}
[self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) { [self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
TSContactThread *cThread = TSContactThread *cThread =
[TSContactThread getOrCreateThreadWithContactId:[TSAccountManager localNumber] transaction:transaction]; [TSContactThread getOrCreateThreadWithContactId:[TSAccountManager localNumber] transaction:transaction];
@ -402,7 +410,6 @@ dispatch_queue_t sendingQueue() {
expiresInSeconds:outgoingMessage.expiresInSeconds]; expiresInSeconds:outgoingMessage.expiresInSeconds];
[incomingMessage saveWithTransaction:transaction]; [incomingMessage saveWithTransaction:transaction];
}]; }];
[self handleMessageSentLocally:outgoingMessage];
} }
- (void)sendSyncTranscriptForMessage:(TSOutgoingMessage *)message - (void)sendSyncTranscriptForMessage:(TSOutgoingMessage *)message

Loading…
Cancel
Save