diff options
author | JellyBrick <shlee1503@naver.com> | 2021-12-03 18:35:06 +0900 |
---|---|---|
committer | JellyBrick <shlee1503@naver.com> | 2021-12-03 18:35:06 +0900 |
commit | 3553efe53c9df0c685a58c00be71b9bb841b4c70 (patch) | |
tree | 8b1b5c43fdcf923b39ec8c150cc92f33c00b7afd /src/TgTypeParser.cpp | |
parent | 814ac074633125c975fa6979e79c93cc7115a57b (diff) |
migrate(user-id): from 32-bit integer to 64-bit integer
fix #187, fix #186, fix #181
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; } |