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

Fixed support for *channel_post updates

Этот коммит содержится в:
Max Melentiev
2016-12-09 13:33:55 +03:00
родитель 88178113d7
Коммит 99fbe41b16
4 изменённых файлов: 35 добавлений и 31 удалений

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

@@ -50,7 +50,7 @@ module Telegram
# 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'
@@ -183,11 +183,13 @@ module Telegram
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']]]

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

@@ -1,6 +1,6 @@
module Telegram
module Bot
VERSION = '0.10.1'.freeze
VERSION = '0.10.2'.freeze
def self.gem_version
Gem::Version.new VERSION