Check for nil in response to PerformJoin

This commit is contained in:
Devon Hudson 2023-04-25 15:55:21 -06:00
parent e21fd0241e
commit b5b4812a32
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -172,6 +172,9 @@ func (r *FederationInternalAPI) performJoinUsingServer(
return err
}
r.statistics.ForServer(serverName).Success(statistics.SendDirect)
if response == nil {
return fmt.Errorf("Received nil response from gomatrixserverlib.PerformJoin")
}
// We need to immediately update our list of joined hosts for this room now as we are technically
// joined. We must do this synchronously: we cannot rely on the roomserver output events as they