mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
@@ -158,7 +158,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationCoordinatorDelegate,
|
|||||||
} else {
|
} else {
|
||||||
navigationRootCoordinator.setSheetCoordinator(GenericCallLinkCoordinator(parameters: .init(url: url)))
|
navigationRootCoordinator.setSheetCoordinator(GenericCallLinkCoordinator(parameters: .init(url: url)))
|
||||||
}
|
}
|
||||||
case .roomMemberDetails:
|
case .roomMemberDetails, .room:
|
||||||
userSessionFlowCoordinator?.handleAppRoute(route, animated: true)
|
userSessionFlowCoordinator?.handleAppRoute(route, animated: true)
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -115,7 +115,8 @@ struct MatrixPermalinkParser: URLParser {
|
|||||||
switch PermalinkBuilder.detectPermalink(in: url, baseURL: appSettings.permalinkBaseURL) {
|
switch PermalinkBuilder.detectPermalink(in: url, baseURL: appSettings.permalinkBaseURL) {
|
||||||
case .userIdentifier(let userID):
|
case .userIdentifier(let userID):
|
||||||
return .roomMemberDetails(userID: userID)
|
return .roomMemberDetails(userID: userID)
|
||||||
// Other cases will be handled in the future
|
case .roomIdentifier(let roomID):
|
||||||
|
return .room(roomID: roomID)
|
||||||
default:
|
default:
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,4 +120,16 @@ class AppRouteURLParserTests: XCTestCase {
|
|||||||
|
|
||||||
XCTAssertEqual(route, .roomMemberDetails(userID: userID))
|
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