diff options
Diffstat (limited to 'telegram/handlers.go')
-rw-r--r-- | telegram/handlers.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/telegram/handlers.go b/telegram/handlers.go index aea1844..c79f765 100644 --- a/telegram/handlers.go +++ b/telegram/handlers.go @@ -108,7 +108,7 @@ func (c *Client) updateHandler() { // new user discovered func (c *Client) updateUser(update *client.UpdateUser) { - c.cache.users[update.User.Id] = update.User + c.cache.SetUser(update.User.Id, update.User) show, status := c.userStatusToText(update.User.Status) go c.processStatusUpdate(int64(update.User.Id), status, show) } @@ -133,7 +133,7 @@ func (c *Client) updateNewChat(update *client.UpdateNewChat) { } } - c.cache.chats[update.Chat.Id] = update.Chat + c.cache.SetChat(update.Chat.Id, update.Chat) var isChannel = false if update.Chat.Type.ChatTypeType() == client.TypeChatTypeSupergroup { |