diff options
Diffstat (limited to 'telegram/connect.go')
-rw-r--r-- | telegram/connect.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/telegram/connect.go b/telegram/connect.go index 8cee376..f2ea01d 100644 --- a/telegram/connect.go +++ b/telegram/connect.go @@ -91,7 +91,7 @@ func (c *Client) Connect(resource string) error { c.locks.authorizationReady.Wait() if c.Online() { - c.refresh(resource) + c.roster(resource) return nil } @@ -157,7 +157,7 @@ func (c *Client) Disconnect(resource string, quit bool) bool { c.deleteResource(resource) } // other resources are still active - if len(c.resources) > 0 && !quit { + if (len(c.resources) > 0 || c.Session.KeepOnline) && !quit { log.Infof("Resource %v for account %v has disconnected, %v remaining", resource, c.Session.Login, len(c.resources)) log.Debugf("Resources: %#v", c.resources) return false |