diff options
author | bodqhrohro <bodqhrohro@gmail.com> | 2019-12-05 00:47:44 +0300 |
---|---|---|
committer | bodqhrohro <bodqhrohro@gmail.com> | 2019-12-05 00:47:44 +0300 |
commit | 8cd6387552dc9b73c60950e8c1a47c84ae13f98b (patch) | |
tree | b3ea81add8cbac8fee2a5153f792cdf217a65d10 /telegram/handlers.go | |
parent | fa841bfa8bc0941e0416608e78308401c9334ae9 (diff) |
Make chats/users cache private
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 f0faa18..0cc3fad 100644 --- a/telegram/handlers.go +++ b/telegram/handlers.go @@ -102,7 +102,7 @@ func (c *Client) updateHandler() { // new user discovered func (c *Client) updateUser(update *client.UpdateUser) { - cache.users[update.User.Id] = update.User + c.cache.users[update.User.Id] = update.User show, status := userStatusToText(update.User.Status) c.processStatusUpdate(int64(update.User.Id), status, show) } @@ -127,7 +127,7 @@ func (c *Client) updateNewChat(update *client.UpdateNewChat) { } } - cache.chats[update.Chat.Id] = update.Chat + c.cache.chats[update.Chat.Id] = update.Chat var isChannel = false if update.Chat.Type.ChatTypeType() == client.TypeChatTypeSupergroup { |