mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 15:08:28 +00:00
Allow join to accept server_name in query parameters (#1346)
This commit is contained in:
parent
3802efe301
commit
42183bef50
1 changed files with 11 additions and 0 deletions
|
@ -41,6 +41,17 @@ func JoinRoomByIDOrAlias(
|
|||
}
|
||||
joinRes := roomserverAPI.PerformJoinResponse{}
|
||||
|
||||
// Check to see if any ?server_name= query parameters were
|
||||
// given in the request.
|
||||
if serverNames, ok := req.URL.Query()["server_name"]; ok {
|
||||
for _, serverName := range serverNames {
|
||||
joinReq.ServerNames = append(
|
||||
joinReq.ServerNames,
|
||||
gomatrixserverlib.ServerName(serverName),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// If content was provided in the request then incude that
|
||||
// in the request. It'll get used as a part of the membership
|
||||
// event content.
|
||||
|
|
Loading…
Reference in a new issue