lib/telegram/bot/client.rb in telegram-bot-ruby-0.10.0 vs lib/telegram/bot/client.rb in telegram-bot-ruby-0.10.1
- old
+ new
@@ -51,10 +51,10 @@
url: 'https://api.telegram.org'
}
end
def log_incoming_message(message)
- uid = message.from ? message.from.id : nil
+ uid = message.respond_to?(:from) && message.from ? message.from.id : nil
logger.info(
format('Incoming message: text="%s" uid=%s', message, uid)
)
end
end