mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
@@ -158,7 +158,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
||||
} else {
|
||||
navigationRootCoordinator.setSheetCoordinator(GenericCallLinkCoordinator(parameters: .init(url: url)))
|
||||
}
|
||||
case .roomMemberDetails:
|
||||
case .roomMemberDetails, .room:
|
||||
userSessionFlowCoordinator?.handleAppRoute(route, animated: true)
|
||||
default:
|
||||
break
|
||||
|
||||
@@ -115,7 +115,8 @@ struct MatrixPermalinkParser: URLParser {
|
||||
switch PermalinkBuilder.detectPermalink(in: url, baseURL: appSettings.permalinkBaseURL) {
|
||||
case .userIdentifier(let userID):
|
||||
return .roomMemberDetails(userID: userID)
|
||||
// Other cases will be handled in the future
|
||||
case .roomIdentifier(let roomID):
|
||||
return .room(roomID: roomID)
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -120,4 +120,16 @@ class AppRouteURLParserTests: XCTestCase {
|
||||
|
||||
XCTAssertEqual(route, .roomMemberDetails(userID: userID))
|
||||
}
|
||||
|
||||
func testMatrixRoomIdentifierURL() {
|
||||
let id = "!abcdefghijklmnopqrstuvwxyz1234567890:matrix.org"
|
||||
guard let url = URL(string: "\(appSettings.permalinkBaseURL)/#/\(id)") else {
|
||||
XCTFail("Invalid url")
|
||||
return
|
||||
}
|
||||
|
||||
let route = appRouteURLParser.route(from: url)
|
||||
|
||||
XCTAssertEqual(route, .room(roomID: id))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Tapping on matrix room id link brings you to that room.
|
||||
Reference in New Issue
Block a user