rubenlagus / TelegramBots

Java library to create bots using Telegram Bots API
https://telegram.me/JavaBotsApi
MIT License
4.76k stars 1.22k forks source link

[SendPhoto]: 400 Bad request (chat_id not found) #1321

Open bekzod-murotboyev opened 9 months ago

bekzod-murotboyev commented 9 months ago

Describe the bug org.telegram.telegrambots.meta.api.methods.send.SendPhoto class fields are not annotated with @JsonProperty annotation, that is why always telegram bot api returns 400 Bad request with content of "chat_id" not found!

To Reproduce Steps to reproduce the behavior:

  1. Go to org.telegram.telegrambots.meta.api.methods.send.SendPhoto
  2. Annotate chatId and other fields with @JsonProperty annotation
Georglider commented 8 months ago

I have made a pull request regarding to this issue: https://github.com/rubenlagus/TelegramBots/pull/1302

TheQuiu commented 8 months ago

🎂👏💋

bekzod-murotboyev commented 7 months ago

Thanks for your attention. From which version those changes will be available?

Georglider commented 7 months ago

Thanks for your attention. From which version those changes will be available?

I don't know, owner of this repo should accept #1302 in order for changes to apply.

rubenlagus commented 7 months ago

I'll check it now that the new version is fully out. Need to consider this change carefully since this was intentionally done as it is now (since the proposed solution is only partial support for the Bots API. hence, would require some extra documentation/Javadocs to ensure it is clear for everything.

Also, the proposed MR doesn't include any kind of UT that proves it works as it is expected