aboutsummaryrefslogtreecommitdiff
path: root/telegram/connect.go
diff options
context:
space:
mode:
Diffstat (limited to 'telegram/connect.go')
-rw-r--r--telegram/connect.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/telegram/connect.go b/telegram/connect.go
index cb9936a..f367370 100644
--- a/telegram/connect.go
+++ b/telegram/connect.go
@@ -135,7 +135,7 @@ func (c *Client) Disconnect() {
log.Warn("Disconnecting from Telegram network...")
// we're offline (unsubscribe if logout)
- for id := range c.cache.chats {
+ for _, id := range c.cache.ChatsKeys() {
gateway.SendPresence(
c.xmpp,
c.jid,
@@ -200,7 +200,7 @@ func (c *Client) interactor() {
Limit: chatsLimit,
})
if err != nil {
- log.Error("Could not retrieve chats")
+ log.Errorf("Could not retrieve chats: %v", err)
}
gateway.SendPresence(c.xmpp, c.jid, gateway.SPStatus("Logged in "+c.Session.Login))