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
+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{