diff --git a/appservice/ping.go b/appservice/ping.go index bd6bcbd1..774ec423 100644 --- a/appservice/ping.go +++ b/appservice/ping.go @@ -19,7 +19,7 @@ import ( "maunium.net/go/mautrix" ) -func (intent *IntentAPI) EnsureAppserviceConnection(ctx context.Context, appserviceID string) { +func (intent *IntentAPI) EnsureAppserviceConnection(ctx context.Context) { var pingResp *mautrix.RespAppservicePing var txnID string var retryCount int @@ -27,7 +27,7 @@ func (intent *IntentAPI) EnsureAppserviceConnection(ctx context.Context, appserv const maxRetries = 6 for { txnID = intent.TxnID() - pingResp, err = intent.AppservicePing(ctx, appserviceID, txnID) + pingResp, err = intent.AppservicePing(ctx, intent.as.Registration.ID, txnID) if err == nil { break } diff --git a/bridgev2/matrix/connector.go b/bridgev2/matrix/connector.go index 9fdb6804..7af2d128 100644 --- a/bridgev2/matrix/connector.go +++ b/bridgev2/matrix/connector.go @@ -343,7 +343,7 @@ func (br *Connector) ensureConnection(ctx context.Context) { return } - br.Bot.EnsureAppserviceConnection(ctx, br.Config.AppService.ID) + br.Bot.EnsureAppserviceConnection(ctx) } func (br *Connector) fetchMediaConfig(ctx context.Context) {