mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
Handle invite v1 (#1165)
* Implement invite v1 for sytest mainly * Bump gmsl version which falls back to invite v1 if v2 404s * Update whitelist
This commit is contained in:
parent
67f7a53f12
commit
7a8282fccf
5 changed files with 77 additions and 15 deletions
|
@ -83,10 +83,26 @@ func Setup(
|
|||
},
|
||||
)).Methods(http.MethodPut, http.MethodOptions)
|
||||
|
||||
v1fedmux.Handle("/invite/{roomID}/{eventID}", httputil.MakeFedAPI(
|
||||
"federation_invite", cfg.Matrix.ServerName, keys, wakeup,
|
||||
func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest, vars map[string]string) util.JSONResponse {
|
||||
res := InviteV1(
|
||||
httpReq, request, vars["roomID"], vars["eventID"],
|
||||
cfg, rsAPI, keys,
|
||||
)
|
||||
return util.JSONResponse{
|
||||
Code: res.Code,
|
||||
JSON: []interface{}{
|
||||
res.Code, res.JSON,
|
||||
},
|
||||
}
|
||||
},
|
||||
)).Methods(http.MethodPut, http.MethodOptions)
|
||||
|
||||
v2fedmux.Handle("/invite/{roomID}/{eventID}", httputil.MakeFedAPI(
|
||||
"federation_invite", cfg.Matrix.ServerName, keys, wakeup,
|
||||
func(httpReq *http.Request, request *gomatrixserverlib.FederationRequest, vars map[string]string) util.JSONResponse {
|
||||
return Invite(
|
||||
return InviteV2(
|
||||
httpReq, request, vars["roomID"], vars["eventID"],
|
||||
cfg, rsAPI, keys,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue