mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 17:33:09 -06:00
Fix linting
This commit is contained in:
parent
5057d62787
commit
e39eec59df
|
|
@ -18,7 +18,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
|
||||||
|
|
||||||
"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"
|
||||||
|
|
@ -37,8 +36,6 @@ func MakeJoin(
|
||||||
request *gomatrixserverlib.FederationRequest,
|
request *gomatrixserverlib.FederationRequest,
|
||||||
cfg config.Dendrite,
|
cfg config.Dendrite,
|
||||||
query api.RoomserverQueryAPI,
|
query api.RoomserverQueryAPI,
|
||||||
now time.Time,
|
|
||||||
keys gomatrixserverlib.KeyRing,
|
|
||||||
roomID, userID string,
|
roomID, userID string,
|
||||||
) util.JSONResponse {
|
) util.JSONResponse {
|
||||||
_, domain, err := gomatrixserverlib.SplitID('@', userID)
|
_, domain, err := gomatrixserverlib.SplitID('@', userID)
|
||||||
|
|
@ -105,7 +102,6 @@ func SendJoin(
|
||||||
cfg config.Dendrite,
|
cfg config.Dendrite,
|
||||||
query api.RoomserverQueryAPI,
|
query api.RoomserverQueryAPI,
|
||||||
producer *producers.RoomserverProducer,
|
producer *producers.RoomserverProducer,
|
||||||
now time.Time,
|
|
||||||
keys gomatrixserverlib.KeyRing,
|
keys gomatrixserverlib.KeyRing,
|
||||||
roomID, eventID string,
|
roomID, eventID string,
|
||||||
) util.JSONResponse {
|
) util.JSONResponse {
|
||||||
|
|
@ -147,7 +143,7 @@ func SendJoin(
|
||||||
Message: event.Redact().JSON(),
|
Message: event.Redact().JSON(),
|
||||||
AtTS: event.OriginServerTS(),
|
AtTS: event.OriginServerTS(),
|
||||||
}}
|
}}
|
||||||
verifyResults, err := keys.VerifyJSONs(httpReq.Context(), verifyRequests)
|
verifyResults, err := keys.VerifyJSONs(ctx, verifyRequests)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return httputil.LogThenError(httpReq, err)
|
return httputil.LogThenError(httpReq, err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ func Setup(
|
||||||
roomID := vars["roomID"]
|
roomID := vars["roomID"]
|
||||||
userID := vars["userID"]
|
userID := vars["userID"]
|
||||||
return MakeJoin(
|
return MakeJoin(
|
||||||
httpReq.Context(), httpReq, request, cfg, query, time.Now(), keys, roomID, userID,
|
httpReq.Context(), httpReq, request, cfg, query, roomID, userID,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)).Methods("GET")
|
)).Methods("GET")
|
||||||
|
|
@ -143,7 +143,7 @@ func Setup(
|
||||||
roomID := vars["roomID"]
|
roomID := vars["roomID"]
|
||||||
userID := vars["userID"]
|
userID := vars["userID"]
|
||||||
return SendJoin(
|
return SendJoin(
|
||||||
httpReq.Context(), httpReq, request, cfg, query, producer, time.Now(), keys, roomID, userID,
|
httpReq.Context(), httpReq, request, cfg, query, producer, keys, roomID, userID,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
)).Methods("PUT")
|
)).Methods("PUT")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue