summaryrefslogtreecommitdiff
path: root/src/TgTypeParser.cpp
diff options
context:
space:
mode:
authorJellyBrick <shlee1503@naver.com>2018-05-28 19:39:17 +0900
committerJellyBrick <shlee1503@naver.com>2018-05-28 19:39:17 +0900
commit955e70900a847f79b632a65c850b510b737a2a2a (patch)
tree4d9b11968d7a65d930b638fb54f39cfd005804a0 /src/TgTypeParser.cpp
parentce9bcf9d653a0598b41fcf52708d01b396c6fd30 (diff)
Bot API 3.6 update
Diffstat (limited to 'src/TgTypeParser.cpp')
-rw-r--r--src/TgTypeParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp
index f910761..4ba571f 100644
--- a/src/TgTypeParser.cpp
+++ b/src/TgTypeParser.cpp
@@ -159,6 +159,8 @@ Message::Ptr TgTypeParser::parseJsonAndGetMessage(const ptree& data) const {
result->channelChatCreated = data.get("channel_chat_created", false);
result->migrateToChatId = data.get<int64_t>("migrate_to_chat_id", 0);
result->migrateFromChatId = data.get<int64_t>("migrate_from_chat_id", 0);
+ result->pinnedMessage = tryParseJson<Message>(&TgTypeParser::parseJsonAndGetMessage, data, "pinned_message");
+ result->connectedWebsite = data.get("connected_website", "");
return result;
}
@@ -200,6 +202,8 @@ string TgTypeParser::parseMessage(const Message::Ptr& object) const {
appendToJson(result, "channel_chat_created", object->channelChatCreated);
appendToJson(result, "migrate_to_chat_id", object->migrateToChatId);
appendToJson(result, "migrate_from_chat_id", object->migrateFromChatId);
+ appendToJson(result, "pinned_message", parseMessage(object->pinnedMessage));
+ appendToJson(result, "connected_website", object->connectedWebsite);
result.erase(result.length() - 1);
result += '}';
return result;