Provide calculated server names when opening a room from another (#5155)

* Provide calculated server names when opening a room from another, based on the most frequently used domain names in the user ids for the users in the room.

This helps when following permalinks or navigating to the successor room of a tombstoned one. Previously, the `/summary` endpoint was failing because no server names were used in the `via` parameters.
This commit is contained in:
Jorge Martin Espinosa 2025-08-12 17:17:46 +02:00 committed by GitHub
parent 1a31e49f1e
commit 516c3cfda3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 54 additions and 27 deletions

View file

@ -29,4 +29,7 @@ value class UserId(val value: String) : Serializable {
get() = value
.removePrefix("@")
.substringBefore(":")
val domainName: String?
get() = value.substringAfter(":").takeIf { it.isNotEmpty() }
}