Closed ferdi2005 closed 5 years ago
Yes, it's expected, because Poll object doesn't have such attribute. You need to check message
type explicitly in your code.
Why don’t fix this/simplify adding type poll to poll objects? What’s the class in the code?
It should return chat type as usual, but it throws an exception if I use method .chat.type on message when it's a poll. (Workaround: using message.respond_to? :type && message.chat.type == 'private')
Error performing GetUpdatesFromBotJob (Job ID: 9cf9f15f-928c-45ea-926e-378074cc52b8) from Sidekiq(default) in 343.81ms: NoMethodError (undefined method 'chat' for #<Telegram::Bot::Types::Poll:0x00007fc111dc28d0>):