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:
parent
dc33a3b2d3
commit
12ea2064c7
16 changed files with 54 additions and 27 deletions
|
|
@ -29,4 +29,7 @@ value class UserId(val value: String) : Serializable {
|
|||
get() = value
|
||||
.removePrefix("@")
|
||||
.substringBefore(":")
|
||||
|
||||
val domainName: String?
|
||||
get() = value.substringAfter(":").takeIf { it.isNotEmpty() }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue