mirror of
https://github.com/matrix-org/dendrite
synced 2025-04-30 06:54:07 +02:00
Merge 0ec82fbeae
into 79b87c7a08
This commit is contained in:
commit
1656bc0249
1 changed files with 10 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue