mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Display fallback when replied event content is partially missing
This commit is contained in:
@@ -1854,6 +1854,13 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=(?:'|\")(.*?)(?:'|\")>(
|
||||
MXJSONModelSetString(repliedEventContent, repliedEvent.content[kMXMessageBodyKey]);
|
||||
}
|
||||
}
|
||||
|
||||
// No message content in a non-redacted event. Formatter should use fallback.
|
||||
if (!repliedEventContent)
|
||||
{
|
||||
MXLogWarning(@"[MXKEventFormatter] Unable to retrieve content from replied event %@", repliedEvent.description)
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
if (event.content[kMXMessageContentKeyNewContent])
|
||||
@@ -1886,7 +1893,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=(?:'|\")(.*?)(?:'|\")>(
|
||||
}
|
||||
else
|
||||
{
|
||||
MXLogDebug(@"[MXKEventFormatter] Unable to build reply event %@", event.description)
|
||||
MXLogWarning(@"[MXKEventFormatter] Unable to build reply event %@", event.description)
|
||||
}
|
||||
|
||||
return html;
|
||||
|
||||
Reference in New Issue
Block a user