lib/telegram/bot/client.rb in telegram-bot-ruby-0.7.1 vs lib/telegram/bot/client.rb in telegram-bot-ruby-0.7.2

- old
+ new

@@ -46,14 +46,17 @@ def default_options { offset: 0, timeout: 20, logger: NullLogger.new } end def extract_message(update) - update.inline_query || - update.chosen_inline_result || - update.callback_query || - update.edited_message || - update.message + types = %w(inline_query + chosen_inline_result + callback_query + edited_message + message + channel_post + edited_channel_post) + types.inject(nil) { |acc, elem| acc || update.send(elem) } end def log_incoming_message(message) uid = message.from ? message.from.id : nil logger.info(