From 707bcac4dd0fffd961dbb325e7d11752ee55392d Mon Sep 17 00:00:00 2001 From: llnulldisk <48621230+llnulldisk@users.noreply.github.com> Date: Fri, 9 Sep 2022 17:33:11 +0200 Subject: Update to API 5.7 --- src/TgTypeParser.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/TgTypeParser.cpp') diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp index 85b44e8..daf80c8 100644 --- a/src/TgTypeParser.cpp +++ b/src/TgTypeParser.cpp @@ -386,6 +386,7 @@ Sticker::Ptr TgTypeParser::parseJsonAndGetSticker(const boost::property_tree::pt result->width = data.get("width", 0); result->height = data.get("height", 0); result->isAnimated = data.get("is_animated", false); + result->isVideo = data.get("is_video", false); result->thumb = tryParseJson(&TgTypeParser::parseJsonAndGetPhotoSize, data, "thumb"); result->emoji = data.get("emoji", ""); result->setName = data.get("set_name", ""); @@ -405,6 +406,7 @@ std::string TgTypeParser::parseSticker(const Sticker::Ptr& object) const { appendToJson(result, "width", object->width); appendToJson(result, "height", object->height); appendToJson(result, "is_animated", object->isAnimated); + appendToJson(result, "is_video", object->isVideo); appendToJson(result, "thumb", parsePhotoSize(object->thumb)); appendToJson(result, "emoji", object->emoji); appendToJson(result, "set_name", object->setName); @@ -420,6 +422,7 @@ StickerSet::Ptr TgTypeParser::parseJsonAndGetStickerSet(const boost::property_tr result->name = data.get("name", ""); result->title = data.get("title", ""); result->isAnimated = data.get("is_animated", false); + result->isVideo = data.get("is_video", false); result->containsMasks = data.get("contains_masks", false); result->stickers = parseJsonAndGetArray(&TgTypeParser::parseJsonAndGetSticker, data, "stickers"); result->thumb = tryParseJson(&TgTypeParser::parseJsonAndGetPhotoSize, data, "thumb"); @@ -435,6 +438,7 @@ std::string TgTypeParser::parseStickerSet(const StickerSet::Ptr& object) const { appendToJson(result, "name", object->name); appendToJson(result, "title", object->title); appendToJson(result, "is_animated", object->isAnimated); + appendToJson(result, "is_video", object->isVideo); appendToJson(result, "contains_masks", object->containsMasks); appendToJson(result, "stickers", parseArray(&TgTypeParser::parseSticker, object->stickers)); appendToJson(result, "thumb", parsePhotoSize(object->thumb)); -- cgit v1.2.3