mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Remove unneeded parameters
This commit is contained in:
parent
c69daaf7b3
commit
a281bb4538
|
|
@ -18,28 +18,17 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
|
"github.com/matrix-org/dendrite/clientapi/auth/authtypes"
|
||||||
"github.com/matrix-org/dendrite/clientapi/auth/storage/accounts"
|
|
||||||
"github.com/matrix-org/dendrite/clientapi/httputil"
|
"github.com/matrix-org/dendrite/clientapi/httputil"
|
||||||
"github.com/matrix-org/dendrite/clientapi/jsonerror"
|
"github.com/matrix-org/dendrite/clientapi/jsonerror"
|
||||||
"github.com/matrix-org/dendrite/clientapi/producers"
|
|
||||||
"github.com/matrix-org/dendrite/common/config"
|
|
||||||
federationSenderAPI "github.com/matrix-org/dendrite/federationsender/api"
|
|
||||||
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
|
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
|
||||||
"github.com/matrix-org/gomatrixserverlib"
|
|
||||||
"github.com/matrix-org/util"
|
"github.com/matrix-org/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
func JoinRoomByIDOrAlias(
|
func JoinRoomByIDOrAlias(
|
||||||
req *http.Request,
|
req *http.Request,
|
||||||
device *authtypes.Device,
|
device *authtypes.Device,
|
||||||
roomIDOrAlias string,
|
|
||||||
cfg *config.Dendrite, // nolint:unparam
|
|
||||||
federation *gomatrixserverlib.FederationClient, // nolint:unparam
|
|
||||||
producer *producers.RoomserverProducer, // nolint:unparam
|
|
||||||
rsAPI roomserverAPI.RoomserverInternalAPI,
|
rsAPI roomserverAPI.RoomserverInternalAPI,
|
||||||
fsAPI federationSenderAPI.FederationSenderInternalAPI, // nolint:unparam
|
roomIDOrAlias string,
|
||||||
keyRing gomatrixserverlib.KeyRing, // nolint:unparam
|
|
||||||
accountDB accounts.Database, // nolint:unparam
|
|
||||||
) util.JSONResponse {
|
) util.JSONResponse {
|
||||||
// Prepare to ask the roomserver to perform the room join.
|
// Prepare to ask the roomserver to perform the room join.
|
||||||
joinReq := roomserverAPI.PerformJoinRequest{
|
joinReq := roomserverAPI.PerformJoinRequest{
|
||||||
|
|
|
||||||
|
|
@ -100,8 +100,7 @@ func Setup(
|
||||||
return util.ErrorResponse(err)
|
return util.ErrorResponse(err)
|
||||||
}
|
}
|
||||||
return JoinRoomByIDOrAlias(
|
return JoinRoomByIDOrAlias(
|
||||||
req, device, vars["roomIDOrAlias"], cfg, federation, producer,
|
req, device, rsAPI, vars["roomIDOrAlias"],
|
||||||
rsAPI, federationSender, keyRing, accountDB,
|
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
).Methods(http.MethodPost, http.MethodOptions)
|
).Methods(http.MethodPost, http.MethodOptions)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue