Treat contact lookups as successful if user is found but chat is not
This commit is contained in:
parent
ea0d0df226
commit
b9c07b6f16
|
@ -78,7 +78,12 @@ func (c *Client) GetContactByID(id int64, chat *client.Chat) (*client.Chat, *cli
|
|||
ChatId: id,
|
||||
})
|
||||
if err != nil {
|
||||
// error is irrelevant if the user was found successfully
|
||||
if user == nil {
|
||||
return nil, nil, err
|
||||
} else {
|
||||
return nil, user, nil
|
||||
}
|
||||
}
|
||||
|
||||
c.cache.chats[id] = cacheChat
|
||||
|
|
Loading…
Reference in a new issue