aboutsummaryrefslogtreecommitdiff
path: root/telegram/handlers.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2022-02-07 19:21:43 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2022-02-07 19:21:43 +0300
commit32036e3f90fc1c41df430d9d811fa3d04844b349 (patch)
tree92af8b77c5dc97e345315bcae69d5d3648477549 /telegram/handlers.go
parent5a48600b7af0a29e136348f0b96be6a014ced9f9 (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.go8
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