mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 02:23:10 -06:00
Remove redundant check in fed/SendInvite
This commit is contained in:
parent
d30bae3509
commit
ac61081624
|
|
@ -521,11 +521,6 @@ func (r *FederationInternalAPI) SendInvite(
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
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 {
|
if event.StateKey() == nil {
|
||||||
return nil, errors.New("invite must be a state event")
|
return nil, errors.New("invite must be a state event")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue