telegrambotlib-qt
telegrambotlib-qt copied to clipboard
Fixing TelegramBotChat::id
As long as TelegramBotChat id's type is qint32 it cant fit all the information that is being returned by Telegram Bot Api methods which type is equal to long long (C++ style). So it bugs and this kind of bug is very hard to detect. To fix it you just need to replace qint32 so it becomes long long (or qint64).
...
struct TelegramBotChat : public TelegramBotObject {
long long id;
...
virtual void fromJson(QJsonObject& object) {
JsonHelperT<long long>::jsonPathGet(object, "id", this->id);
..
}
}