diff options
Diffstat (limited to 'telegram')
-rw-r--r-- | telegram/connect.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/telegram/connect.go b/telegram/connect.go index 400c706..c30f9a0 100644 --- a/telegram/connect.go +++ b/telegram/connect.go @@ -3,6 +3,7 @@ package telegram import ( "github.com/pkg/errors" + log "github.com/sirupsen/logrus" "github.com/zelenin/go-tdlib/client" ) @@ -12,6 +13,8 @@ func (c *Client) Connect() error { return nil } + log.Warn("Connecting to Telegram network...") + authorizer := client.ClientAuthorizer() go func() { for { @@ -48,6 +51,10 @@ func (c *Client) Disconnect() { return } + log.Warn("Disconnecting from Telegram network...") + + // TODO: send unavailable presence to cached chats + c.client.Stop() c.online = false } |