Remove redundant check in fed/SendInvite

This commit is contained in:
Devon Hudson 2023-06-06 11:08:26 -06:00
parent d30bae3509
commit ac61081624
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -521,11 +521,6 @@ func (r *FederationInternalAPI) SendInvite(
if err != nil {
return nil, err
}
// For portable accounts, we need to verify the inviter domain is still associated with this server.
// The userID of the inviter may have changed to another server in which case we cannot send the invite.
if !r.cfg.Matrix.IsLocalServerName(inviter.Domain()) {
return nil, fmt.Errorf("the invite must be from a local user")
}
if event.StateKey() == nil {
return nil, errors.New("invite must be a state event")