Ensure quoted replies with attachments are handled properly.
This commit is contained in:
parent
68b939d89d
commit
ab9e2c4e11
|
@ -561,6 +561,18 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
|
|||
return;
|
||||
}
|
||||
|
||||
// Check for quoted replies _before_ media album handling,
|
||||
// since that logic may exit early.
|
||||
if (message.quotedMessage) {
|
||||
self.quotedReply =
|
||||
[OWSQuotedReplyModel quotedReplyWithQuotedMessage:message.quotedMessage transaction:transaction];
|
||||
|
||||
if (self.quotedReply.body.length > 0) {
|
||||
self.displayableQuotedText =
|
||||
[self displayableQuotedTextForText:self.quotedReply.body interactionId:message.uniqueId];
|
||||
}
|
||||
}
|
||||
|
||||
NSArray<TSAttachment *> *attachments = [message attachmentsWithTransaction:transaction];
|
||||
if ([message isMediaAlbumWithTransaction:transaction]) {
|
||||
OWSAssertDebug(attachments.count > 0);
|
||||
|
@ -642,16 +654,6 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
|
|||
self.messageCellType = OWSMessageCellType_TextMessage;
|
||||
self.displayableBodyText = [[DisplayableText alloc] initWithFullText:@"" displayText:@"" isTextTruncated:NO];
|
||||
}
|
||||
|
||||
if (message.quotedMessage) {
|
||||
self.quotedReply =
|
||||
[OWSQuotedReplyModel quotedReplyWithQuotedMessage:message.quotedMessage transaction:transaction];
|
||||
|
||||
if (self.quotedReply.body.length > 0) {
|
||||
self.displayableQuotedText =
|
||||
[self displayableQuotedTextForText:self.quotedReply.body interactionId:message.uniqueId];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (NSArray<ConversationMediaAlbumItem *> *)mediaAlbumItemsForAttachments:(NSArray<TSAttachment *> *)attachments
|
||||
|
|
Loading…
Reference in New Issue