From 81613135d1be603a02d712894651348d530461f3 Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Fri, 28 Dec 2018 00:55:02 -0600 Subject: [PATCH] Attempt to fix crash when bot is added/removed from group --- commands.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands.rb b/commands.rb index 764b47c..2cdc181 100644 --- a/commands.rb +++ b/commands.rb @@ -1,7 +1,8 @@ def validate_incoming_data(message) message = message.message if message.is_a? Telegram::Bot::Types::CallbackQuery return "Received message is not from a valid source! Type: \"#{message.chat.type}\". Ignoring." if ! @allowed_sources.include?(message.chat.type) - puts message.chat.type + return "Unauthorized user sent message. User ID: #{message.from.id} Source ID: #{message.chat.id}." if ! @conf['auth_chat'].include?(message.chat.id.to_s) + #puts message.chat.type return true end