only process attachments if they exist

pull/1/head
Michael Kirk 7 years ago
parent 18766280f6
commit 4a70f8dc0f

@ -175,14 +175,16 @@ NS_ASSUME_NONNULL_BEGIN
[self.readReceiptManager applyEarlyReadReceiptsForOutgoingMessageFromLinkedDevice:outgoingMessage [self.readReceiptManager applyEarlyReadReceiptsForOutgoingMessageFromLinkedDevice:outgoingMessage
transaction:transaction]; transaction:transaction];
[self.attachmentDownloads if (outgoingMessage.hasAttachments) {
downloadAttachmentsForMessage:outgoingMessage [self.attachmentDownloads
transaction:transaction downloadAttachmentsForMessage:outgoingMessage
success:attachmentHandler transaction:transaction
failure:^(NSError *error) { success:attachmentHandler
OWSLogError( failure:^(NSError *error) {
@"failed to fetch transcripts attachments for message: %@", outgoingMessage); OWSLogError(
}]; @"failed to fetch transcripts attachments for message: %@", outgoingMessage);
}];
}
} }
@end @end

Loading…
Cancel
Save