mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-11 08:03:09 -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
|
||||
// and the state key are equal so we don't need to check both.
|
||||
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{
|
||||
Code: http.StatusForbidden,
|
||||
JSON: jsonerror.Forbidden("The sender of the join is invalid"),
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ func MakeLeave(
|
|||
}
|
||||
|
||||
// SendLeave implements the /send_leave API
|
||||
// nolint:gocyclo
|
||||
func SendLeave(
|
||||
httpReq *http.Request,
|
||||
request *gomatrixserverlib.FederationRequest,
|
||||
|
|
@ -184,7 +185,7 @@ func SendLeave(
|
|||
// 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.
|
||||
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{
|
||||
Code: http.StatusForbidden,
|
||||
JSON: jsonerror.Forbidden("The sender of the join is invalid"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue