Remove unneeded parameters

This commit is contained in:
Neil Alexander 2020-05-04 09:22:34 +01:00
parent c69daaf7b3
commit a281bb4538
2 changed files with 2 additions and 14 deletions

View file

@ -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{

View file

@ -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)