0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2025-04-30 06:54:07 +02:00
This commit is contained in:
Johannes Marbach 2024-11-14 15:12:08 +01:00 committed by GitHub
commit 1656bc0249
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,9 +44,16 @@ func JoinRoomByIDOrAlias(
Content: map[string]interface{}{},
}
// Check to see if any ?server_name= query parameters were
// given in the request.
if serverNames, ok := req.URL.Query()["server_name"]; ok {
// Check to see if any ?via= or ?server_name= query parameters
// were given in the request.
if serverNames, ok := req.URL.Query()["via"]; ok {
for _, serverName := range serverNames {
joinReq.ServerNames = append(
joinReq.ServerNames,
spec.ServerName(serverName),
)
}
} else if serverNames, ok := req.URL.Query()["server_name"]; ok {
for _, serverName := range serverNames {
joinReq.ServerNames = append(
joinReq.ServerNames,