client: update for better connection detection

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-09-09 21:50:41 -06:00
parent cd0d940889
commit 50ab23423f
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -57,4 +57,4 @@ require (
rsc.io/qr v0.2.0 // indirect
)
replace github.com/gotd/td => github.com/beeper/td v0.107.1-0.20240822123749-cc62ffad55ad
replace github.com/gotd/td => github.com/beeper/td v0.107.1-0.20240910034630-041e169998aa
+2 -2
View File
@@ -2,8 +2,8 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU=
github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU=
github.com/beeper/td v0.107.1-0.20240822123749-cc62ffad55ad h1:24/FZ0SztGlEn4SObzP1tU+Xql1C4lm9AxyPj+X/vOY=
github.com/beeper/td v0.107.1-0.20240822123749-cc62ffad55ad/go.mod h1:rHtaG0hd4EY0ice4f9CVH/JxsA7ZICqkcH3aFSVZplg=
github.com/beeper/td v0.107.1-0.20240910034630-041e169998aa h1:MrwT5FYp/1YAdApBM+2pQzekaVH9BZVVkK4+osYfHfU=
github.com/beeper/td v0.107.1-0.20240910034630-041e169998aa/go.mod h1:rHtaG0hd4EY0ice4f9CVH/JxsA7ZICqkcH3aFSVZplg=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=
+2 -2
View File
@@ -195,7 +195,7 @@ func NewTelegramClient(ctx context.Context, tc *TelegramConnector, login *bridge
Logger: zaplog,
UpdateHandler: client.updatesManager,
OnDead: client.onDead,
OnSession: client.onSession,
OnConnected: client.onConnected,
OnAuthError: client.onAuthError,
PingTimeout: time.Duration(tc.Config.Ping.TimeoutSeconds) * time.Second,
PingInterval: time.Duration(tc.Config.Ping.IntervalSeconds) * time.Second,
@@ -362,7 +362,7 @@ func (t *TelegramClient) onDead() {
})
}
func (t *TelegramClient) onSession() {
func (t *TelegramClient) onConnected() {
authStatus, err := t.client.Auth().Status(context.Background())
if err != nil {
t.userLogin.BridgeState.Send(status.BridgeState{