diff options
Diffstat (limited to 'telegram/utils.go')
-rw-r--r-- | telegram/utils.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/telegram/utils.go b/telegram/utils.go index eb7b905..ac100fd 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -30,7 +30,7 @@ const newlineChar string = "\n" // GetContactByUsername resolves username to user id retrieves user and chat information func (c *Client) GetContactByUsername(username string) (*client.Chat, *client.User, error) { - if !c.online { + if !c.Online() { return nil, nil, errOffline } @@ -47,7 +47,7 @@ func (c *Client) GetContactByUsername(username string) (*client.Chat, *client.Us // GetContactByID gets user and chat information from cache (or tries to retrieve it, if missing) func (c *Client) GetContactByID(id int64, chat *client.Chat) (*client.Chat, *client.User, error) { - if !c.online { + if !c.Online() { return nil, nil, errOffline } @@ -130,7 +130,7 @@ func (c *Client) userStatusToText(status client.UserStatus) (string, string) { } func (c *Client) processStatusUpdate(chatID int64, status string, show string, args ...args.V) error { - if !c.online { + if !c.Online() { return nil } @@ -432,7 +432,7 @@ func (c *Client) ProcessOutgoingMessage(chatID int64, text string, messageID int } } - if !c.online { + if !c.Online() { // we're offline return } |