diff --git a/telegram/handlers.go b/telegram/handlers.go index d6b945f..aea1844 100644 --- a/telegram/handlers.go +++ b/telegram/handlers.go @@ -110,13 +110,13 @@ func (c *Client) updateHandler() { func (c *Client) updateUser(update *client.UpdateUser) { c.cache.users[update.User.Id] = update.User show, status := c.userStatusToText(update.User.Status) - c.processStatusUpdate(int64(update.User.Id), status, show) + go c.processStatusUpdate(int64(update.User.Id), status, show) } // user status changed func (c *Client) updateUserStatus(update *client.UpdateUserStatus) { show, status := c.userStatusToText(update.Status) - c.processStatusUpdate(int64(update.UserId), status, show, gateway.SPImmed(false)) + go c.processStatusUpdate(int64(update.UserId), status, show, gateway.SPImmed(false)) } // new chat discovered @@ -155,7 +155,7 @@ func (c *Client) updateNewChat(update *client.UpdateNewChat) { } if update.Chat.Id < 0 { - c.processStatusUpdate(update.Chat.Id, update.Chat.Title, "chat") + go c.processStatusUpdate(update.Chat.Id, update.Chat.Title, "chat") } }