dependencies: update mautrix-go
This commit is contained in:
committed by
Sumner Evans
parent
8e994edbde
commit
16040adc53
@@ -450,17 +450,17 @@ func (t *TelegramClient) onAuthError(ctx context.Context, err error) {
|
||||
}
|
||||
}
|
||||
|
||||
func (t *TelegramClient) Connect(ctx context.Context) error {
|
||||
func (t *TelegramClient) Connect(ctx context.Context) {
|
||||
if !t.userLogin.Metadata.(*UserLoginMetadata).Session.HasAuthKey() {
|
||||
t.sendBadCredentials("User does not have an auth key")
|
||||
return nil
|
||||
return
|
||||
}
|
||||
|
||||
var err error
|
||||
ctx, t.clientCancel, err = connectTelegramClient(ctx, t.client)
|
||||
if err != nil {
|
||||
t.sendUnknownError(err)
|
||||
return nil
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
err = t.updatesManager.Run(ctx, t.client.API(), t.telegramUserID, updates.AuthOptions{})
|
||||
@@ -489,7 +489,6 @@ func (t *TelegramClient) Connect(ctx context.Context) error {
|
||||
CreatePortal: false, // Do not create the portal if it doesn't already exist
|
||||
},
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *TelegramClient) Disconnect() {
|
||||
|
||||
@@ -74,10 +74,7 @@ func finalizeLogin(ctx context.Context, user *bridgev2.User, authorization *tg.A
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to save new login: %w", err)
|
||||
}
|
||||
err = ul.Client.Connect(ul.Log.WithContext(context.Background()))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to connect after login: %w", err)
|
||||
}
|
||||
ul.Client.Connect(ul.Log.WithContext(context.Background()))
|
||||
client := ul.Client.(*TelegramClient)
|
||||
me, err := client.client.Self(ctx)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user