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

Controller#respond_with to reply without reply_to_message_id

Этот коммит содержится в:
Max Melentiev
2016-06-02 20:51:24 +03:00
родитель 7393b1a1f3
Коммит 0205891985
6 изменённых файлов: 64 добавлений и 46 удалений

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

@@ -35,13 +35,15 @@ module Telegram
end
end
def reply_with(type, *)
Instrumentation.instrument(:reply_with, type: type) { super }
%i(respond_with reply_with).each do |method|
define_method(method) do |type, *args|
Instrumentation.instrument(:respond_with, type: type) { super(type, *args) }
end
end
%i(answer_callback_query answer_inline_query).each do |type|
define_method(type) do |*args|
Instrumentation.instrument(:reply_with, type: type) { super(*args) }
Instrumentation.instrument(:respond_with, type: type) { super(*args) }
end
end