diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c21ec6..db775cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Unreleased + +- One more description for StaleChat error. + # 0.8.0 - Fixed `#reply_with`, now it sets `reply_to_message_id` as it's supposed to. diff --git a/lib/telegram/bot.rb b/lib/telegram/bot.rb index 06521b5..69557e0 100644 --- a/lib/telegram/bot.rb +++ b/lib/telegram/bot.rb @@ -13,6 +13,7 @@ module Telegram # check response. class StaleChat < Error DESCRIPTIONS = [ + 'Bot was blocked', 'bot was kicked', "can't write to", 'group chat is deactivated', diff --git a/spec/telegram/bot_spec.rb b/spec/telegram/bot_spec.rb index 6213036..1fa1681 100644 --- a/spec/telegram/bot_spec.rb +++ b/spec/telegram/bot_spec.rb @@ -17,6 +17,9 @@ RSpec.describe Telegram::Bot do expect(subject.call( 'description' => 'Bad request: group chat is deactivated' )).to eq true + expect(subject.call( + 'description' => 'Forbidden: Bot was blocked by the user' + )).to eq true end end end