Remove check that can't be satisied with the original auth events

This commit is contained in:
Neil Alexander 2021-11-09 13:10:05 +00:00
parent ce91d535e4
commit 16b32316c2
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -298,16 +298,6 @@ func attemptMakeJoinForRestrictedMembership(
// and found by us.
signed := event.Sign(string(cfg.Matrix.ServerName), cfg.Matrix.KeyID, cfg.Matrix.PrivateKey)
// Now, see if the join is valid with the new changes. If it isn't
// then something else is forbidding the join.
if err = gomatrixserverlib.Allowed(&signed, &provider); err != nil {
logger.WithError(err).Error("Join is not allowed")
return util.JSONResponse{
Code: http.StatusForbidden,
JSON: jsonerror.Forbidden(err.Error()),
}
}
// Otherwise, the new join event looks good, so return it.
return util.JSONResponse{
Code: http.StatusOK,