Add via parameter on join room requests as per MSC4156
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
parent
3ca9dae95a
commit
207e92acdd
@ -36,9 +36,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…
Reference in New Issue
Block a user