diff --git a/Riot/Modules/MatrixKit/Utils/EventFormatter/MXKEventFormatter.m b/Riot/Modules/MatrixKit/Utils/EventFormatter/MXKEventFormatter.m index fa6495fd5..63f86617a 100644 --- a/Riot/Modules/MatrixKit/Utils/EventFormatter/MXKEventFormatter.m +++ b/Riot/Modules/MatrixKit/Utils/EventFormatter/MXKEventFormatter.m @@ -1846,7 +1846,17 @@ static NSString *const kHTMLATagRegexPattern = @"( } else { - MXJSONModelSetString(repliedEventContent, repliedEvent.content[@"formatted_body"]); + MXReplyEventParser *parser = [[MXReplyEventParser alloc] init]; + MXReplyEventParts *parts = [parser parse:repliedEvent]; + MXJSONModelSetString(repliedEventContent, parts.formattedBodyParts.replyText) + if (!repliedEventContent) + { + MXJSONModelSetString(repliedEventContent, parts.bodyParts.replyText) + } + if (!repliedEventContent) + { + MXJSONModelSetString(repliedEventContent, repliedEvent.content[@"formatted_body"]); + } if (!repliedEventContent) { MXJSONModelSetString(repliedEventContent, repliedEvent.content[kMXMessageBodyKey]); diff --git a/changelog.d/6729.bugfix b/changelog.d/6729.bugfix new file mode 100644 index 000000000..214b20ab4 --- /dev/null +++ b/changelog.d/6729.bugfix @@ -0,0 +1 @@ +Fix replied event content parsing for nested replies