Don't check blacklist when attempting federated join

This commit is contained in:
Devon Hudson 2023-04-26 10:12:21 -06:00
parent 174a777818
commit d3f8ab1d28
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -19,14 +19,11 @@ func (a *FederationInternalAPI) MakeJoin(
) (res gomatrixserverlib.MakeJoinResponse, err error) {
ctx, cancel := context.WithTimeout(ctx, defaultTimeout)
defer cancel()
ires, err := a.doRequestIfNotBlacklisted(s, func() (interface{}, error) {
return a.federation.MakeJoin(ctx, origin, s, roomID, userID)
})
ires, err := a.federation.MakeJoin(ctx, origin, s, roomID, userID)
if err != nil {
return &fclient.RespMakeJoin{}, err
}
r := ires.(fclient.RespMakeJoin)
return &r, nil
return &ires, nil
}
func (a *FederationInternalAPI) SendJoin(
@ -34,14 +31,11 @@ func (a *FederationInternalAPI) SendJoin(
) (res gomatrixserverlib.SendJoinResponse, err error) {
ctx, cancel := context.WithTimeout(ctx, defaultTimeout)
defer cancel()
ires, err := a.doRequestIfNotBlacklisted(s, func() (interface{}, error) {
return a.federation.SendJoin(ctx, origin, s, event)
})
ires, err := a.federation.SendJoin(ctx, origin, s, event)
if err != nil {
return &fclient.RespSendJoin{}, err
}
r := ires.(fclient.RespSendJoin)
return &r, nil
return &ires, nil
}
func (a *FederationInternalAPI) GetEventAuth(