aboutsummaryrefslogtreecommitdiff
path: root/telegram/handlers.go
diff options
context:
space:
mode:
authorbodqhrohro <bodqhrohro@gmail.com>2019-12-05 00:47:44 +0300
committerbodqhrohro <bodqhrohro@gmail.com>2019-12-05 00:47:44 +0300
commit8cd6387552dc9b73c60950e8c1a47c84ae13f98b (patch)
treeb3ea81add8cbac8fee2a5153f792cdf217a65d10 /telegram/handlers.go
parentfa841bfa8bc0941e0416608e78308401c9334ae9 (diff)
Make chats/users cache private
Diffstat (limited to 'telegram/handlers.go')
-rw-r--r--telegram/handlers.go4
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 {