Handle tap on user mentions (#1850)

* user mention routing implemented

* more tests

* better naming

* fixed a test
This commit is contained in:
Mauro
2023-10-03 10:11:05 +02:00
committed by GitHub
parent 7124f24d7c
commit 355535cd75
8 changed files with 169 additions and 37 deletions
@@ -108,4 +108,16 @@ class AppRouteURLParserTests: XCTestCase {
// Then the route shouldn't be considered valid and should be ignored.
XCTAssertEqual(route, nil)
}
func testMatrixUserURL() {
let userID = "@test:matrix.org"
guard let url = URL(string: "\(appSettings.permalinkBaseURL)/#/\(userID)") else {
XCTFail("Invalid url")
return
}
let route = appRouteURLParser.route(from: url)
XCTAssertEqual(route, .roomMemberDetails(userID: userID))
}
}