mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +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:
@@ -200,4 +200,13 @@ extension JoinedRoomProxyProtocol {
|
||||
await updateMembers()
|
||||
return membersPublisher.value
|
||||
}
|
||||
|
||||
// This is a horrible workaround for not having any server names available when using tombstone links with v12 room IDs.
|
||||
func knownServerNames(maxCount: Int) -> any Sequence<String> {
|
||||
membersPublisher.value
|
||||
.prefix(1000) // No need to go crazy here…
|
||||
.compactMap { $0.userID.split(separator: ":").last.map(String.init) }
|
||||
.uniqued()
|
||||
.prefix(maxCount)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user