Skip to content

Fixing TelegramBotChat::id  #4

@Malibushko

Description

@Malibushko

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);
..
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions