MESSENGER-3671 Merge FOSS 1.9.8

Conflicts:
 - CommonConfiguration.swift
 - BuildSettings.swift
 - Generated/images.Swift
 - RoomMemberDetailsViewController.m
 - LiveLocationSharingViewModell
-  PinCodeEnterViewController.m
This commit is contained in:
Frank Rotermund
2022-10-05 15:47:27 +02:00
744 changed files with 6999 additions and 3819 deletions
@@ -1846,7 +1846,17 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=(?:'|\")(.*?)(?:'|\")>(
}
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]);
@@ -166,10 +166,11 @@ private extension CMarkNode {
private extension String {
/// Returns array of URLs detected inside the String.
var containedUrls: [NSTextCheckingResult] {
guard let detector = try? NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue) else {
guard let detector = try? NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue),
let percentEncoded = self.addingPercentEncoding(withAllowedCharacters: .urlHostAllowed) else {
return []
}
return detector.matches(in: self, options: [], range: NSRange(location: 0, length: self.utf16.count))
return detector.matches(in: percentEncoded, options: [], range: NSRange(location: 0, length: percentEncoded.utf16.count))
}
}