require 'telegram_bot/params/shared/chat_component' module Telegram module Params class ForwardChat < ChatComponent def initialize(params) message = params.require(:message) @params = message[:forward_from_chat] # If from exist then return nil return nil if @params.blank? forward_from_params = message.require(:forward_from_chat) super(forward_from_params) end def nil? super || @params.nil? end end end end