lib/telegram/bot/updates_controller.rb in telegram-bot-0.10.1 vs lib/telegram/bot/updates_controller.rb in telegram-bot-0.10.2

- old
+ new

@@ -48,11 +48,11 @@ # There is also ability to run action without update: # # ControllerClass.new(bot, from: telegram_user, chat: telegram_chat). # process(:help, *args) # - class UpdatesController < AbstractController::Base + class UpdatesController < AbstractController::Base # rubocop:disable ClassLength abstract! require 'telegram/bot/updates_controller/session' require 'telegram/bot/updates_controller/log_subscriber' require 'telegram/bot/updates_controller/instrumentation' @@ -181,14 +181,16 @@ def action_for_message cmd, args = self.class.command_from_text(payload['text'], bot_username) cmd &&= self.class.action_for_command(cmd) [true, cmd, args] if cmd end + alias_method :action_for_channel_post, :action_for_message # It doesn't extract commands from edited messages. Just process # them as usual ones. def action_for_edited_message end + alias_method :action_for_edited_channel_post, :action_for_edited_message def action_for_inline_query [false, payload_type, [payload['query'], payload['offset']]] end