Support tapping Matrix URIs in messages. (#2828)

This commit is contained in:
Doug
2024-05-10 15:22:22 +01:00
committed by GitHub
parent d8845303fd
commit 6984afd6c0
5 changed files with 70 additions and 4 deletions
@@ -188,6 +188,12 @@ class AttributedStringBuilderTests: XCTestCase {
checkLinkIn(attributedString: attributedStringBuilder.fromPlain(string), expectedLink: string, expectedRuns: 1)
}
func testMatrixURI() {
let string = "matrix:roomid/hello:matrix.org/e/world?via=matrix.org"
checkLinkIn(attributedString: attributedStringBuilder.fromHTML(string), expectedLink: string, expectedRuns: 1)
checkLinkIn(attributedString: attributedStringBuilder.fromPlain(string), expectedLink: string, expectedRuns: 1)
}
func testUserIDLink() {
let userID = "@user:matrix.org"
let string = "The user is \(userID)."