diff options
-rw-r--r-- | include/tgbot/types/ChosenInlineResult.h | 2 | ||||
-rw-r--r-- | src/TgTypeParser.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/tgbot/types/ChosenInlineResult.h b/include/tgbot/types/ChosenInlineResult.h index 3c71496..c6d730e 100644 --- a/include/tgbot/types/ChosenInlineResult.h +++ b/include/tgbot/types/ChosenInlineResult.h @@ -28,7 +28,7 @@ public: /** * The user that chose the result. */ - User::Ptr user; + User::Ptr from; /** * The query that was used to obtain the result. diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp index 244496e..6672c04 100644 --- a/src/TgTypeParser.cpp +++ b/src/TgTypeParser.cpp @@ -711,7 +711,7 @@ std::string TgTypeParser::parseInlineQueryResultVideo(const InlineQueryResultVid ChosenInlineResult::Ptr TgTypeParser::parseJsonAndGetChosenInlineResult(const boost::property_tree::ptree& data) const { ChosenInlineResult::Ptr result(new ChosenInlineResult); result->resultId = data.get<string>("result_id"); - result->user = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "user"); + result->from = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "from"); result->query = data.get<string>("query"); return result; } @@ -724,7 +724,7 @@ std::string TgTypeParser::parseChosenInlineResult(const ChosenInlineResult::Ptr& string result; result += '{'; appendToJson(result, "result_id", object->resultId); - appendToJson(result, "user", parseUser(object->user)); + appendToJson(result, "from", parseUser(object->from)); appendToJson(result, "query", object->query); result.erase(result.length() - 1); result += '}'; |