зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-04 10:15:50 +03:00
Fix typo in module name: CallbackQueyContext -> CallbackQueryContext
Этот коммит содержится в:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
- One more description for StaleChat error.
|
- One more description for StaleChat error.
|
||||||
- edit_message_* methods.
|
- edit_message_* methods.
|
||||||
|
- Fix typo in module name: CallbackQueyContext -> CallbackQueryContext.
|
||||||
|
|
||||||
# 0.8.0
|
# 0.8.0
|
||||||
|
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ class Telegram::WebhookController < Telegram::Bot::UpdatesController
|
|||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
You can use `CallbackQueyContext` in the similar way to split `#callback_query` into
|
You can use `CallbackQueryContext` in the similar way to split `#callback_query` into
|
||||||
several specific methods. It doesn't require session support, and takes context from
|
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
|
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
|
`my_ctx_callback_query('smth...')` when there is such action method. Otherwise
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ module Telegram
|
|||||||
require 'telegram/bot/updates_controller/log_subscriber'
|
require 'telegram/bot/updates_controller/log_subscriber'
|
||||||
require 'telegram/bot/updates_controller/instrumentation'
|
require 'telegram/bot/updates_controller/instrumentation'
|
||||||
require 'telegram/bot/updates_controller/reply_helpers'
|
require 'telegram/bot/updates_controller/reply_helpers'
|
||||||
autoload :CallbackQueyContext, 'telegram/bot/updates_controller/callback_query_context'
|
autoload :CallbackQueryContext, 'telegram/bot/updates_controller/callback_query_context'
|
||||||
autoload :MessageContext, 'telegram/bot/updates_controller/message_context'
|
autoload :MessageContext, 'telegram/bot/updates_controller/message_context'
|
||||||
autoload :Botan, 'telegram/bot/updates_controller/botan'
|
autoload :Botan, 'telegram/bot/updates_controller/botan'
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ module Telegram
|
|||||||
class UpdatesController
|
class UpdatesController
|
||||||
# Use separate actions for different callback queries.
|
# Use separate actions for different callback queries.
|
||||||
# It doesn't require session support. Simply add `%{context}:` prefix to data.
|
# It doesn't require session support. Simply add `%{context}:` prefix to data.
|
||||||
module CallbackQueyContext
|
module CallbackQueryContext
|
||||||
protected
|
protected
|
||||||
|
|
||||||
# Uses #context_from_callback_query as context name.
|
# Uses #context_from_callback_query as context name.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
RSpec.describe Telegram::Bot::UpdatesController::CallbackQueyContext do
|
RSpec.describe Telegram::Bot::UpdatesController::CallbackQueryContext do
|
||||||
include_context 'telegram/bot/updates_controller'
|
include_context 'telegram/bot/updates_controller'
|
||||||
let(:controller_class) do
|
let(:controller_class) do
|
||||||
described_class = self.described_class
|
described_class = self.described_class
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user