mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 02:23:10 -06:00
Lint
This commit is contained in:
parent
d7733ecdff
commit
dcef178054
|
|
@ -221,7 +221,7 @@ func SendJoin(
|
||||||
// the request. By this point we've already asserted that the sender
|
// the request. By this point we've already asserted that the sender
|
||||||
// and the state key are equal so we don't need to check both.
|
// and the state key are equal so we don't need to check both.
|
||||||
var serverName gomatrixserverlib.ServerName
|
var serverName gomatrixserverlib.ServerName
|
||||||
if _, serverName, err := gomatrixserverlib.SplitID('@', event.Sender()); err != nil {
|
if _, serverName, err = gomatrixserverlib.SplitID('@', event.Sender()); err != nil {
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
Code: http.StatusForbidden,
|
Code: http.StatusForbidden,
|
||||||
JSON: jsonerror.Forbidden("The sender of the join is invalid"),
|
JSON: jsonerror.Forbidden("The sender of the join is invalid"),
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ func MakeLeave(
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendLeave implements the /send_leave API
|
// SendLeave implements the /send_leave API
|
||||||
|
// nolint:gocyclo
|
||||||
func SendLeave(
|
func SendLeave(
|
||||||
httpReq *http.Request,
|
httpReq *http.Request,
|
||||||
request *gomatrixserverlib.FederationRequest,
|
request *gomatrixserverlib.FederationRequest,
|
||||||
|
|
@ -184,7 +185,7 @@ func SendLeave(
|
||||||
// the request. By this point we've already asserted that the sender
|
// the request. By this point we've already asserted that the sender
|
||||||
// and the state key are equal so we don't need to check both.
|
// and the state key are equal so we don't need to check both.
|
||||||
var serverName gomatrixserverlib.ServerName
|
var serverName gomatrixserverlib.ServerName
|
||||||
if _, serverName, err := gomatrixserverlib.SplitID('@', event.Sender()); err != nil {
|
if _, serverName, err = gomatrixserverlib.SplitID('@', event.Sender()); err != nil {
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
Code: http.StatusForbidden,
|
Code: http.StatusForbidden,
|
||||||
JSON: jsonerror.Forbidden("The sender of the join is invalid"),
|
JSON: jsonerror.Forbidden("The sender of the join is invalid"),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue