diff --git a/go.mod b/go.mod index af76c4d3..5b56c847 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f golang.org/x/net v0.31.0 google.golang.org/protobuf v1.35.2 - maunium.net/go/mautrix v0.22.0 + maunium.net/go/mautrix v0.22.1-0.20241202131110-166ba04aae02 ) require ( diff --git a/go.sum b/go.sum index 69e31050..8df0f419 100644 --- a/go.sum +++ b/go.sum @@ -97,5 +97,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M= maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA= -maunium.net/go/mautrix v0.22.0 h1:nLrnLYiMyFV6qZPqpkNogkOPgm2dQTYiQXlu9Nc3rz8= -maunium.net/go/mautrix v0.22.0/go.mod h1:oqwf9WYC/brqucM+heYk4gX11O59nP+ljvyxVhndFIM= +maunium.net/go/mautrix v0.22.1-0.20241202131110-166ba04aae02 h1:g8L4GpOhyg5EuXtASDKyU9Cg79ZjATlUnh+giFumQgc= +maunium.net/go/mautrix v0.22.1-0.20241202131110-166ba04aae02/go.mod h1:oqwf9WYC/brqucM+heYk4gX11O59nP+ljvyxVhndFIM= diff --git a/pkg/connector/client.go b/pkg/connector/client.go index ebd2defc..8a8d4155 100644 --- a/pkg/connector/client.go +++ b/pkg/connector/client.go @@ -219,14 +219,13 @@ func (s *SignalClient) bridgeStateLoop(statusChan <-chan signalmeow.SignalConnec } } -func (s *SignalClient) Connect(ctx context.Context) error { +func (s *SignalClient) Connect(ctx context.Context) { if s.Client == nil { s.UserLogin.BridgeState.Send(status.BridgeState{StateEvent: status.StateBadCredentials, Message: "You're not logged into Signal"}) - return nil + return } s.updateRemoteProfile(ctx, false) s.tryConnect(ctx, 0) - return nil } func (s *SignalClient) Disconnect() { diff --git a/pkg/connector/login.go b/pkg/connector/login.go index 56363391..525d14a9 100644 --- a/pkg/connector/login.go +++ b/pkg/connector/login.go @@ -172,10 +172,7 @@ func (qr *QRLogin) processingWait(ctx context.Context) (*bridgev2.LoginStep, err return nil, fmt.Errorf("failed to create user login: %w", err) } backgroundCtx := ul.Log.WithContext(context.Background()) - err = ul.Client.Connect(backgroundCtx) - if err != nil { - return nil, fmt.Errorf("failed to connect after login: %w", err) - } + ul.Client.Connect(backgroundCtx) if signalClient := ul.Client.(*SignalClient).Client; signalClient.Store.MasterKey != nil { zerolog.Ctx(ctx).Info().Msg("Received master key in login, syncing storage immediately") go signalClient.SyncStorage(ctx)