summaryrefslogtreecommitdiff
path: root/src/TgTypeParser.cpp
diff options
context:
space:
mode:
authornitanmarcel <nitan.marcel@protonmail.com>2019-11-19 21:59:22 +0200
committernitanmarcel <nitan.marcel@protonmail.com>2019-11-19 21:59:22 +0200
commiteb10c8705be495cc9d663dd48672eb9e174f0e4c (patch)
treeb090dad39242f60a0915c139ee9161514f5753e6 /src/TgTypeParser.cpp
parent23553bc251ca673137b684082a6f84062f053bd2 (diff)
API 4.3
Diffstat (limited to 'src/TgTypeParser.cpp')
-rw-r--r--src/TgTypeParser.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp
index 528993b..02fed47 100644
--- a/src/TgTypeParser.cpp
+++ b/src/TgTypeParser.cpp
@@ -179,6 +179,7 @@ Message::Ptr TgTypeParser::parseJsonAndGetMessage(const ptree& data) const {
result->invoice = tryParseJson<Invoice>(&TgTypeParser::parseJsonAndGetInvoice, data, "invoice");
result->successfulPayment = tryParseJson<SuccessfulPayment>(&TgTypeParser::parseJsonAndGetSuccessfulPayment, data, "successful_payment");
result->connectedWebsite = data.get("connected_website", "");
+ result->replyMarkup = tryParseJson<InlineKeyboardMarkup>(&TgTypeParser::parseJsonAndGetInlineKeyboardMarkup, data, "reply_markup");
return result;
}
@@ -228,6 +229,7 @@ string TgTypeParser::parseMessage(const Message::Ptr& object) const {
appendToJson(result, "connected_website", object->connectedWebsite);
appendToJson(result, "invoice", parseInvoice(object->invoice));
appendToJson(result, "successful_payment", parseSuccessfulPayment(object->successfulPayment));
+ appendToJson(result, "reply_markup", parseReplyKeyboardMarkup(object->replyMarkup));
removeLastComma(result);
result += '}';
return result;
@@ -1759,6 +1761,7 @@ InlineKeyboardButton::Ptr TgTypeParser::parseJsonAndGetInlineKeyboardButton(cons
auto result(make_shared<InlineKeyboardButton>());
result->text = data.get<string>("text");
result->url = data.get<string>("url", "");
+ result->loginUrl = make_shared<LoginUrl>();
result->callbackData = data.get<string>("callback_data", "");
result->switchInlineQuery = data.get<string>("switch_inline_query", "");
result->switchInlineQueryCurrentChat = data.get<string>("switch_inline_query_current_chat", "");