diff options
author | Oleg Morozenkov <m@oleg.rocks> | 2021-12-04 12:02:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-04 12:02:39 +0100 |
commit | 55d3fbca78774d7c033cd31860fd1d5f11dd2ad1 (patch) | |
tree | 25d44cf50526fab019b5495a83d4546198307413 /src/TgTypeParser.cpp | |
parent | 814ac074633125c975fa6979e79c93cc7115a57b (diff) | |
parent | 1b69e2be2564de979dd481772f3f7d489e957c2f (diff) |
Merge pull request #188 from JellyBrick/patch-3
migrate(user-id): from 32-bit integer to 64-bit integer
Diffstat (limited to 'src/TgTypeParser.cpp')
-rw-r--r-- | src/TgTypeParser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp index 95c60c9..b96068e 100644 --- a/src/TgTypeParser.cpp +++ b/src/TgTypeParser.cpp @@ -63,7 +63,7 @@ string TgTypeParser::parseChat(const Chat::Ptr& object) const { User::Ptr TgTypeParser::parseJsonAndGetUser(const ptree& data) const { auto result(make_shared<User>()); - result->id = data.get<int32_t>("id"); + result->id = data.get<int64_t>("id"); result->isBot = data.get<bool>("is_bot", false); result->firstName = data.get<string>("first_name"); result->lastName = data.get("last_name", ""); @@ -613,7 +613,7 @@ Contact::Ptr TgTypeParser::parseJsonAndGetContact(const ptree& data) const { result->phoneNumber = data.get<string>("phone_number"); result->firstName = data.get<string>("first_name"); result->lastName = data.get("last_name", ""); - result->userId = data.get("user_id", ""); + result->userId = data.get("user_id", 0); result->vcard = data.get("vcard", ""); return result; } @@ -988,7 +988,7 @@ std::string TgTypeParser::parseChatPhoto(const ChatPhoto::Ptr& object) const { ResponseParameters::Ptr TgTypeParser::parseJsonAndGetResponseParameters(const boost::property_tree::ptree& data) const { auto result(make_shared<ResponseParameters>()); - result->migrateToChatId = data.get<int32_t>("migrate_to_chat_id", 0); + result->migrateToChatId = data.get<int64_t>("migrate_to_chat_id", 0); result->retryAfter = data.get<int32_t>("retry_after", 0); return result; } |