telegram-bot icon indicating copy to clipboard operation
telegram-bot copied to clipboard

"save_context" method is not working properly in group chat

Open Nmerey opened this issue 2 years ago • 1 comments

When using Poller mode, save_context does not trigger passed method when used in group chat but works in bot's chat.

Below is when used in group chat: image

It does not fetch updates: image

When used in bot's chat save_context triggers get_location method passed to it: image

It does fetch updates: image

Questions:

  1. May it be because of group chat id?
  2. Or some new restrictions about fetching updates in Telegram?(Could not find any info about that)

Nmerey avatar Oct 19 '23 15:10 Nmerey

Context is based on session. See how to configure session key in docs https://github.com/telegram-bot-rb/telegram-bot#session

By default it only uses user id: https://github.com/telegram-bot-rb/telegram-bot/blob/master/lib/telegram/bot/updates_controller/session.rb#L33

printercu avatar Oct 20 '23 07:10 printercu