Add a workaround to include some via parameters for room v12 tombstone links. (#4413)

Without them, following the link fails as previously the server could use the server name from the room ID (which in and of itself seems somewhat error prone).
This commit is contained in:
Doug
2025-08-14 13:02:07 +01:00
committed by GitHub
parent 3dc6d73899
commit de626186bd
7 changed files with 23 additions and 11 deletions
@@ -5,6 +5,7 @@
// Please see LICENSE files in the repository root for full details.
//
import Algorithms
import Combine
import Foundation
import MatrixRustSDK
@@ -117,7 +118,8 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
actionsSubject.send(.displayKnockRequests)
case .displaySuccessorRoom:
guard let successorID = roomProxy.infoPublisher.value.successor?.roomId else { return }
actionsSubject.send(.displayRoom(roomID: successorID))
let serverNames = roomProxy.knownServerNames(maxCount: 50) // Limit to the same number used by ClientProxy.resolveRoomAlias(_:)
actionsSubject.send(.displayRoom(roomID: successorID, via: Array(serverNames)))
}
}