aboutsummaryrefslogtreecommitdiff
path: root/telegram/utils.go
diff options
context:
space:
mode:
authorbodqhrohro <bodqhrohro@gmail.com>2019-12-10 21:49:42 +0300
committerbodqhrohro <bodqhrohro@gmail.com>2019-12-10 21:49:42 +0300
commit9e785a56d29f617a29afb941476c73f43bcdb3cc (patch)
tree5eb4443d4f0877ee978e273198ac8e674b97f731 /telegram/utils.go
parent416c70890950f76ce6f5ce902ea9a70165239f56 (diff)
lint
Diffstat (limited to 'telegram/utils.go')
-rw-r--r--telegram/utils.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/telegram/utils.go b/telegram/utils.go
index ded9d2c..8b8da57 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -79,11 +79,11 @@ func (c *Client) GetContactByID(id int64, chat *client.Chat) (*client.Chat, *cli
})
if err != nil {
// error is irrelevant if the user was found successfully
- if user == nil {
- return nil, nil, err
- } else {
+ if user != nil {
return nil, user, nil
}
+
+ return nil, nil, err
}
c.cache.chats[id] = cacheChat