1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-07 19:35:52 +03:00

Contextual actions for callback_query

Этот коммит содержится в:
Max Melentiev
2016-05-17 10:51:45 +03:00
родитель 8994328654
Коммит 23fb9a28d1
5 изменённых файлов: 107 добавлений и 1 удалений

Просмотреть файл

@@ -236,6 +236,12 @@ class Telegram::WebhookController < Telegram::Bot::UpdatesController
end
```
You can use `CallbackQueyContext` in the similar way to split `#callback_query` into
several specific methods. It doesn't require session support, and takes context from
data. If data has a prefix with colon like this `my_ctx:smth...` it'll call
`my_ctx_callback_query('smth...')` when there is such action method. Otherwise
it'll call `callback_query('my_ctx:smth...')` as usual.
To process update run:
```ruby