diff options
-rw-r--r-- | include/tgbot/Api.h | 1 | ||||
-rw-r--r-- | src/TgTypeParser.cpp | 8 |
2 files changed, 3 insertions, 6 deletions
diff --git a/include/tgbot/Api.h b/include/tgbot/Api.h index 6d03000..685f19e 100644 --- a/include/tgbot/Api.h +++ b/include/tgbot/Api.h @@ -41,6 +41,7 @@ #include "tgbot/types/ChatMember.h" #include "tgbot/types/StickerSet.h" #include "tgbot/types/File.h" +#include "tgbot/types/InputMedia.h" namespace TgBot { diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp index fcb7e0e..f910761 100644 --- a/src/TgTypeParser.cpp +++ b/src/TgTypeParser.cpp @@ -549,12 +549,8 @@ string TgTypeParser::parseInputMedia(const InputMedia::Ptr& object) const { appendToJson(result, "type", "video"); } appendToJson(result, "media", object->media); - if (object->caption) { - appendToJson(result, "caption", object->caption); - } - if (object->parseMode) { - appendToJson(result, "parse_mode", object->parseMode); - } + appendToJson(result, "caption", object->caption); + appendToJson(result, "parse_mode", object->parseMode); if (object->width) { appendToJson(result, "width", object->width); } |