Open usadev1984 opened 5 months ago
I confirm the problem. This is wrong api design (tgbot-cpp api, not a telegram). We can not skip optional fields in parameter structures.
Add to title: (Optional fields in Telegram parameter types classes is not optional).
I guess to use std::optional for that purpose. Or even better boost::optional, because it don't require cpp17 and integrates with boost:property_tree.
based on the documentation, my bot should be able to respond to a message without specifying the chat id if the message is in the same chat. however when i try something like the following code to respond to a message a user sent to the bot directly in dm:
i get
Bad Request: chat not found
. the only way around it is to provide the chat id. so for example the following works:am i doing something wrong? im using the latest version of the library btw.