diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-02-07 19:21:43 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2022-02-07 19:21:43 +0300 |
commit | 32036e3f90fc1c41df430d9d811fa3d04844b349 (patch) | |
tree | 92af8b77c5dc97e345315bcae69d5d3648477549 /telegram/handlers.go | |
parent | 5a48600b7af0a29e136348f0b96be6a014ced9f9 (diff) |
Fix status update for users who blacklisted you or were online long time ago
Diffstat (limited to 'telegram/handlers.go')
-rw-r--r-- | telegram/handlers.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/telegram/handlers.go b/telegram/handlers.go index face5dd..0eedc66 100644 --- a/telegram/handlers.go +++ b/telegram/handlers.go @@ -133,14 +133,14 @@ func (c *Client) updateHandler() { // new user discovered func (c *Client) updateUser(update *client.UpdateUser) { c.cache.SetUser(update.User.Id, update.User) - show, status := c.userStatusToText(update.User.Status, update.User.Id) - go c.ProcessStatusUpdate(update.User.Id, status, show) + show, status, presenceType := c.userStatusToText(update.User.Status, update.User.Id) + go c.ProcessStatusUpdate(update.User.Id, status, show, gateway.SPType(presenceType)) } // user status changed func (c *Client) updateUserStatus(update *client.UpdateUserStatus) { - show, status := c.userStatusToText(update.Status, update.UserId) - go c.ProcessStatusUpdate(update.UserId, status, show, gateway.SPImmed(false)) + show, status, presenceType := c.userStatusToText(update.Status, update.UserId) + go c.ProcessStatusUpdate(update.UserId, status, show, gateway.SPImmed(false), gateway.SPType(presenceType)) } // new chat discovered |