зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-01 17:06:19 +03:00
fix reply_to_message_id
Этот коммит содержится в:
@@ -14,7 +14,7 @@ module Telegram
|
||||
payload = self.payload
|
||||
params = params.merge(
|
||||
chat_id: (chat && chat['id'] or raise 'Can not reply_with when chat is not present'),
|
||||
reply_to_message: payload && payload['message_id'],
|
||||
reply_to_message_id: payload && payload['message_id'],
|
||||
)
|
||||
bot.public_send(method, params)
|
||||
end
|
||||
|
||||
@@ -14,7 +14,7 @@ RSpec.describe Telegram::Bot::UpdatesController do
|
||||
expect(controller).to receive(:chat) { chat }
|
||||
expect(bot).to receive("send_#{type}").with(params.merge(
|
||||
chat_id: chat['id'],
|
||||
reply_to_message: payload[:message_id],
|
||||
reply_to_message_id: payload[:message_id],
|
||||
)) { result }
|
||||
should eq result
|
||||
end
|
||||
@@ -29,7 +29,7 @@ RSpec.describe Telegram::Bot::UpdatesController do
|
||||
it 'sets chat_id & reply_to_message' do
|
||||
expect(bot).to receive("send_#{type}").with(params.merge(
|
||||
chat_id: chat['id'],
|
||||
reply_to_message: nil,
|
||||
reply_to_message_id: nil,
|
||||
)) { result }
|
||||
should eq result
|
||||
end
|
||||
|
||||
Ссылка в новой задаче
Block a user