mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 12:28:29 +00:00
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:
@@ -28,7 +28,7 @@ enum TimelineViewModelAction {
|
||||
case composer(action: TimelineComposerAction)
|
||||
case hasScrolled(direction: ScrollDirection)
|
||||
case viewInRoomTimeline(eventID: String)
|
||||
case displayRoom(roomID: String)
|
||||
case displayRoom(roomID: String, via: [String])
|
||||
}
|
||||
|
||||
enum TimelineViewPollAction {
|
||||
|
||||
@@ -214,7 +214,8 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
|
||||
guard let predecessorID = roomProxy.predecessorRoom?.roomId else {
|
||||
fatalError("Predecessor room should exist if this action is triggered.")
|
||||
}
|
||||
actionsSubject.send(.displayRoom(roomID: predecessorID))
|
||||
let serverNames = roomProxy.knownServerNames(maxCount: 50) // Limit to the same number used by ClientProxy.resolveRoomAlias(_:)
|
||||
actionsSubject.send(.displayRoom(roomID: predecessorID, via: Array(serverNames)))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user