diff --git a/app/controllers/telegram_bots/updates_controller.rb b/app/controllers/telegram_bots/updates_controller.rb index d1610b8..53aeb88 100644 --- a/app/controllers/telegram_bots/updates_controller.rb +++ b/app/controllers/telegram_bots/updates_controller.rb @@ -33,16 +33,10 @@ private return if @telegram_bot.username.nil? - expected = case telegram_chat.chat_type - when 'private' - '/shrug' - when 'group', 'supergroup' - "/shrug@#{@telegram_bot.username}" - else - return - end - - return unless message[:text] == expected + return unless message[:text].in? [ + '/shrug', + "/shrug@#{@telegram_bot.username}", + ] @telegram_bot.client.send_message( chat_id: telegram_chat.remote_id,