Telegram::Bot::Exceptions::ResponseError: Telegram API has returned the error. (ok: "false", error_code: "400", description: "Bad Request: can't parse inline query result: Field "url" must be of type String")
This was because activesupport calls as_json instead to_json while using to_json on an array. And the objects (Telegram::Bot::Types::InputTextMessageContent.new) didn't compact.
This PR fix it
Also I rewrote to_compact_hash method. Now it runs faster and creates less objects.
I've got this message when using the gem:
This was because activesupport calls
as_json
insteadto_json
while usingto_json
on an array. And the objects (Telegram::Bot::Types::InputTextMessageContent.new
) didn't compact.This PR fix it
Also I rewrote
to_compact_hash
method. Now it runs faster and creates less objects.