Permalink Tweaks 2 (#2766)

* Missing changelog.

* Parse bare room aliases as permalinks.

Update the SDK.

* Fix tapping the same permalink twice.

Add a test.

Don't clear the focussed item when reaching the bottom of the timeline.

* Make sure sending a message returns to live.
This commit is contained in:
Doug
2024-04-29 17:32:16 +01:00
committed by GitHub
parent aaa8af2996
commit 7c94ed98a5
18 changed files with 111 additions and 52 deletions
@@ -27,12 +27,18 @@ class MatrixEntityRegexTests: XCTestCase {
XCTAssertFalse(MatrixEntityRegex.isMatrixHomeserver("matrix?.org"))
}
func testUserId() {
func testUserID() {
XCTAssertTrue(MatrixEntityRegex.isMatrixUserIdentifier("@username:example.com"))
XCTAssertFalse(MatrixEntityRegex.isMatrixUserIdentifier("username:example.com"))
XCTAssertFalse(MatrixEntityRegex.isMatrixUserIdentifier("@username.example.com"))
}
func testRoomAlias() {
XCTAssertTrue(MatrixEntityRegex.isMatrixRoomAlias("#element-ios:matrix.org"))
XCTAssertFalse(MatrixEntityRegex.isMatrixRoomAlias("element-ios:matrix.org"))
XCTAssertFalse(MatrixEntityRegex.isMatrixRoomAlias("#element-ios.matrix.org"))
}
func testAllUsers() {
XCTAssertTrue(MatrixEntityRegex.containsMatrixAllUsers("@room"))
XCTAssertTrue(MatrixEntityRegex.containsMatrixAllUsers("a@rooma"))