rapierorg / telegram-bot-swift

Telegram Bot SDK for Swift (unofficial)
https://github.com/rapierorg/telegram-bot-swift/wiki
Apache License 2.0
375 stars 63 forks source link

Error response 400 in Raspberry Pi. Chat_id not included in request #116

Open gvJaime opened 3 years ago

gvJaime commented 3 years ago

when compiled and run in a Raspi 2, (armhf, Swift5.1). The requests are generated without the chat_id, for some reason.

Could be rogue behaviour or HTTPUtils.formUrlencode, or curlPerformRequest.

gvJaime commented 3 years ago

for some reason I recompiled and the architecture switched to armv6-unknown-linux-gnueabihf.

Apparently, the problem stems from the fact that the parameters: dictionary fails to include chat_id.

maybe chat_id is not being passed as a Decodable compliant class?

gvJaime commented 3 years ago

chat_id is an Int64, which is encoded using JSONEncoder() in HTTPUtils.

It seems to fail when it's compiled in the Raspi 2

nerzh commented 3 years ago

it seems they don't support it, I'm not sure, but maybe you try my package for Vapor https://github.com/nerzh/telegram-vapor-bot

zmeyc commented 2 years ago

@gvJaime Could you try the latest version? It includes some fixes for formUrlencode