diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | include/tgbot/Api.h | 11 | ||||
-rw-r--r-- | include/tgbot/TgTypeParser.h | 4 | ||||
-rw-r--r-- | include/tgbot/types/Chat.h | 7 | ||||
-rw-r--r-- | include/tgbot/types/InlineKeyboardButton.h | 10 | ||||
-rw-r--r-- | include/tgbot/types/Message.h | 14 | ||||
-rw-r--r-- | include/tgbot/types/PollAnswer.h | 20 | ||||
-rw-r--r-- | include/tgbot/types/Story.h | 22 | ||||
-rw-r--r-- | src/Api.cpp | 9 | ||||
-rw-r--r-- | src/TgTypeParser.cpp | 61 |
10 files changed, 127 insertions, 33 deletions
@@ -9,7 +9,7 @@ Documentation is located [here](http://reo7sp.github.io/tgbot-cpp). ## State -- [x] Telegram Bot API 6.7 +- [x] Telegram Bot API 6.8 - [ ] [Deep Linking](https://core.telegram.org/bots/features#deep-linking) diff --git a/include/tgbot/Api.h b/include/tgbot/Api.h index 5efe50f..c3df15c 100644 --- a/include/tgbot/Api.h +++ b/include/tgbot/Api.h @@ -1350,6 +1350,17 @@ public: bool unhideGeneralForumTopic(boost::variant<std::int64_t, std::string> chatId) const; /** + * @brief Use this method to clear the list of pinned messages in a General forum topic. + * + * The bot must be an administrator in the chat for this to work and must have the canPinMessages administrator right in the supergroup. + * + * @param chatId Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername) + * + * @return Returns True on success. + */ + bool unpinAllGeneralForumTopicMessages(boost::variant<std::int64_t, std::string> chatId) const; + + /** * @brief Use this method to send answers to callback queries sent from inline keyboards. * * The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. diff --git a/include/tgbot/TgTypeParser.h b/include/tgbot/TgTypeParser.h index 99a38a9..ad610df 100644 --- a/include/tgbot/TgTypeParser.h +++ b/include/tgbot/TgTypeParser.h @@ -13,6 +13,7 @@ #include "tgbot/types/Animation.h" #include "tgbot/types/Audio.h" #include "tgbot/types/Document.h" +#include "tgbot/types/Story.h" #include "tgbot/types/Video.h" #include "tgbot/types/VideoNote.h" #include "tgbot/types/Voice.h" @@ -205,6 +206,9 @@ public: Document::Ptr parseJsonAndGetDocument(const boost::property_tree::ptree& data) const; std::string parseDocument(const Document::Ptr& object) const; + Story::Ptr parseJsonAndGetStory(const boost::property_tree::ptree& data) const; + std::string parseStory(const Story::Ptr& object) const; + Video::Ptr parseJsonAndGetVideo(const boost::property_tree::ptree& data) const; std::string parseVideo(const Video::Ptr& object) const; diff --git a/include/tgbot/types/Chat.h b/include/tgbot/types/Chat.h index 2401300..e838046 100644 --- a/include/tgbot/types/Chat.h +++ b/include/tgbot/types/Chat.h @@ -91,6 +91,13 @@ public: std::string emojiStatusCustomEmojiId; /** + * @brief Optional. Expiration date of the emoji status of the other party in a private chat, if any. + * + * Returned only in Api::getChat. + */ + std::int64_t emojiStatusExpirationDate; + + /** * @brief Optional. Bio of the other party in a private chat. * * Returned only in Api::getChat. diff --git a/include/tgbot/types/InlineKeyboardButton.h b/include/tgbot/types/InlineKeyboardButton.h index 1f2e16f..3b59ce8 100644 --- a/include/tgbot/types/InlineKeyboardButton.h +++ b/include/tgbot/types/InlineKeyboardButton.h @@ -13,6 +13,7 @@ namespace TgBot { /** * @brief This object represents one button of an inline keyboard. + * * You must use exactly one of the optional fields. * * @ingroup types @@ -28,6 +29,7 @@ public: /** * @brief Optional. HTTP or tg:// URL to be opened when the button is pressed. + * * Links tg://user?id=<user_id> can be used to mention a user by their ID without using a username, if this is allowed by their privacy settings. */ std::string url; @@ -39,6 +41,7 @@ public: /** * @brief Optional. Description of the Web App that will be launched when the user presses the button. + * * The Web App will be able to send an arbitrary message on behalf of the user using the method Api::answerWebAppQuery. * Available only in private chats between a user and the bot. */ @@ -46,23 +49,22 @@ public: /** * @brief Optional. An HTTPS URL used to automatically authorize the user. + * * Can be used as a replacement for the Telegram Login Widget. */ LoginUrl::Ptr loginUrl; /** * @brief Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. + * * May be empty, in which case just the bot's username will be inserted. - * - * Note: This offers an easy way for users to start using your bot in inline mode when they are currently in a private chat with it. - * Especially useful when combined with switch_pm… actions - in this case the user will be automatically returned to the chat they switched from, skipping the chat selection screen. */ std::string switchInlineQuery; /** * @brief Optional. If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. - * May be empty, in which case only the bot's username will be inserted. * + * May be empty, in which case only the bot's username will be inserted. * This offers a quick way for the user to open your bot in inline mode in the same chat - good for selecting something from multiple options. */ std::string switchInlineQueryCurrentChat; diff --git a/include/tgbot/types/Message.h b/include/tgbot/types/Message.h index 8ed8300..a38dd01 100644 --- a/include/tgbot/types/Message.h +++ b/include/tgbot/types/Message.h @@ -10,6 +10,7 @@ #include "tgbot/types/Document.h" #include "tgbot/types/PhotoSize.h" #include "tgbot/types/Sticker.h" +#include "tgbot/types/Story.h" #include "tgbot/types/Video.h" #include "tgbot/types/VideoNote.h" #include "tgbot/types/Voice.h" @@ -41,9 +42,9 @@ #include "tgbot/types/InlineKeyboardMarkup.h" #include <cstdint> +#include <memory> #include <string> #include <vector> -#include <memory> namespace TgBot { @@ -84,7 +85,7 @@ public: /** * @brief Date the message was sent in Unix time */ - std::int32_t date; + std::int64_t date; /** * @brief Conversation the message belongs to @@ -119,7 +120,7 @@ public: /** * @brief Optional. For forwarded messages, date the original message was sent in Unix time */ - std::int32_t forwardDate; + std::int64_t forwardDate; /** * @brief Optional. True, if the message is sent to a forum topic @@ -146,7 +147,7 @@ public: /** * @brief Optional. Date the message was last edited in Unix time */ - std::int32_t editDate; + std::int64_t editDate; /** * @brief Optional. True, if the message can't be forwarded @@ -201,6 +202,11 @@ public: Sticker::Ptr sticker; /** + * @brief Optional. Message is a forwarded story + */ + Story::Ptr story; + + /** * @brief Optional. Message is a video, information about the video */ Video::Ptr video; diff --git a/include/tgbot/types/PollAnswer.h b/include/tgbot/types/PollAnswer.h index 4476d63..af96377 100644 --- a/include/tgbot/types/PollAnswer.h +++ b/include/tgbot/types/PollAnswer.h @@ -1,8 +1,10 @@ -#ifndef TGBOT_CPP_POLLANSWER_H -#define TGBOT_CPP_POLLANSWER_H +#ifndef TGBOT_POLLANSWER_H +#define TGBOT_POLLANSWER_H +#include "tgbot/types/Chat.h" #include "tgbot/types/User.h" +#include <cstdint> #include <string> #include <memory> #include <vector> @@ -25,16 +27,22 @@ public: std::string pollId; /** - * @brief The user, who changed the answer to the poll + * @brief Optional. The chat that changed the answer to the poll, if the voter is anonymous + */ + Chat::Ptr voterChat; + + /** + * @brief Optional. The user that changed the answer to the poll, if the voter isn't anonymous */ User::Ptr user; /** - * @brief 0-based identifiers of answer options, chosen by the user. - * May be empty if the user retracted their vote. + * @brief 0-based identifiers of chosen answer options. + * + * May be empty if the vote was retracted. */ std::vector<std::int32_t> optionIds; }; } -#endif //TGBOT_CPP_POLLANSWER_H +#endif //TGBOT_POLLANSWER_H diff --git a/include/tgbot/types/Story.h b/include/tgbot/types/Story.h new file mode 100644 index 0000000..98fd701 --- /dev/null +++ b/include/tgbot/types/Story.h @@ -0,0 +1,22 @@ +#ifndef TGBOT_STORY_H +#define TGBOT_STORY_H + +#include <memory> + +namespace TgBot { + +/** + * @brief This object represents a message about a forwarded story in the chat. + * + * Currently holds no information. + * + * @ingroup types + */ +class Story { + +public: + typedef std::shared_ptr<Story> Ptr; +}; +} + +#endif //TGBOT_STORY_H diff --git a/src/Api.cpp b/src/Api.cpp index 8a91aee..b3ce4ea 100644 --- a/src/Api.cpp +++ b/src/Api.cpp @@ -1664,6 +1664,15 @@ bool Api::unhideGeneralForumTopic(boost::variant<std::int64_t, std::string> chat return sendRequest("unhideGeneralForumTopic", args).get<bool>("", false); } +bool Api::unpinAllGeneralForumTopicMessages(boost::variant<std::int64_t, std::string> chatId) const { + std::vector<HttpReqArg> args; + args.reserve(1); + + args.emplace_back("chat_id", chatId); + + return sendRequest("unpinAllGeneralForumTopicMessages", args).get<bool>("", false); +} + bool Api::answerCallbackQuery(const std::string& callbackQueryId, const std::string& text, bool showAlert, diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp index 76a4add..86a25c1 100644 --- a/src/TgTypeParser.cpp +++ b/src/TgTypeParser.cpp @@ -152,6 +152,7 @@ Chat::Ptr TgTypeParser::parseJsonAndGetChat(const boost::property_tree::ptree& d return innerData.get<std::string>(""); }, data, "active_usernames"); result->emojiStatusCustomEmojiId = data.get<std::string>("emoji_status_custom_emoji_id", ""); + result->emojiStatusExpirationDate = data.get<std::int64_t>("emoji_status_expiration_date", 0); result->bio = data.get<std::string>("bio", ""); result->hasPrivateForwards = data.get<bool>("has_private_forwards", false); result->hasRestrictedVoiceAndVideoMessages = data.get<bool>("has_restricted_voice_and_video_messages", false); @@ -200,6 +201,7 @@ std::string TgTypeParser::parseChat(const Chat::Ptr& object) const { return s; }, object->activeUsernames)); appendToJson(result, "emoji_status_custom_emoji_id", object->emojiStatusCustomEmojiId); + appendToJson(result, "emoji_status_expiration_date", object->emojiStatusExpirationDate); appendToJson(result, "bio", object->bio); appendToJson(result, "has_private_forwards", object->hasPrivateForwards); appendToJson(result, "has_restricted_voice_and_video_messages", object->hasRestrictedVoiceAndVideoMessages); @@ -229,19 +231,19 @@ Message::Ptr TgTypeParser::parseJsonAndGetMessage(const boost::property_tree::pt result->messageThreadId = data.get<std::int32_t>("message_thread_id", 0); result->from = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "from"); result->senderChat = tryParseJson<Chat>(&TgTypeParser::parseJsonAndGetChat, data, "sender_chat"); - result->date = data.get<std::int32_t>("date", 0); + result->date = data.get<std::int64_t>("date", 0); result->chat = parseJsonAndGetChat(data.find("chat")->second); result->forwardFrom = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "forward_from"); result->forwardFromChat = tryParseJson<Chat>(&TgTypeParser::parseJsonAndGetChat, data, "forward_from_chat"); result->forwardFromMessageId = data.get<std::int32_t>("forward_from_message_id", 0); result->forwardSignature = data.get<std::string>("forward_signature", ""); result->forwardSenderName = data.get<std::string>("forward_sender_name", ""); - result->forwardDate = data.get<std::int32_t>("forward_date", 0); + result->forwardDate = data.get<std::int64_t>("forward_date", 0); result->isTopicMessage = data.get<bool>("is_topic_message", false); result->isAutomaticForward = data.get<bool>("is_automatic_forward", false); result->replyToMessage = tryParseJson<Message>(&TgTypeParser::parseJsonAndGetMessage, data, "reply_to_message"); result->viaBot = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "via_bot"); - result->editDate = data.get<std::int32_t>("edit_date", 0); + result->editDate = data.get<std::int64_t>("edit_date", 0); result->hasProtectedContent = data.get<bool>("has_protected_content", false); result->mediaGroupId = data.get<std::string>("media_group_id", ""); result->authorSignature = data.get<std::string>("author_signature", ""); @@ -252,6 +254,7 @@ Message::Ptr TgTypeParser::parseJsonAndGetMessage(const boost::property_tree::pt result->document = tryParseJson<Document>(&TgTypeParser::parseJsonAndGetDocument, data, "document"); result->photo = parseJsonAndGetArray<PhotoSize>(&TgTypeParser::parseJsonAndGetPhotoSize, data, "photo"); result->sticker = tryParseJson<Sticker>(&TgTypeParser::parseJsonAndGetSticker, data, "sticker"); + result->story = tryParseJson<Story>(&TgTypeParser::parseJsonAndGetStory, data, "story"); result->video = tryParseJson<Video>(&TgTypeParser::parseJsonAndGetVideo, data, "video"); result->videoNote = tryParseJson<VideoNote>(&TgTypeParser::parseJsonAndGetVideoNote, data, "video_note"); result->voice = tryParseJson<Voice>(&TgTypeParser::parseJsonAndGetVoice, data, "voice"); @@ -332,6 +335,7 @@ std::string TgTypeParser::parseMessage(const Message::Ptr& object) const { appendToJson(result, "document", parseDocument(object->document)); appendToJson(result, "photo", parseArray(&TgTypeParser::parsePhotoSize, object->photo)); appendToJson(result, "sticker", parseSticker(object->sticker)); + appendToJson(result, "story", parseStory(object->story)); appendToJson(result, "video", parseVideo(object->video)); appendToJson(result, "video_note", parseVideoNote(object->videoNote)); appendToJson(result, "voice", parseVoice(object->voice)); @@ -620,6 +624,22 @@ std::string TgTypeParser::parseDocument(const Document::Ptr& object) const { return result; } +Story::Ptr TgTypeParser::parseJsonAndGetStory(const boost::property_tree::ptree& /*data*/) const { + auto result(std::make_shared<Story>()); + return result; +} + +std::string TgTypeParser::parseStory(const Story::Ptr& object) const { + if (!object) { + return ""; + } + std::string result; + result += '{'; + // removeLastComma(result); + result += '}'; + return result; +} + Video::Ptr TgTypeParser::parseJsonAndGetVideo(const boost::property_tree::ptree& data) const { auto result(std::make_shared<Video>()); result->fileId = data.get<std::string>("file_id", ""); @@ -777,6 +797,7 @@ std::string TgTypeParser::parsePollOption(const PollOption::Ptr& object) const { PollAnswer::Ptr TgTypeParser::parseJsonAndGetPollAnswer(const boost::property_tree::ptree& data) const { auto result(std::make_shared<PollAnswer>()); result->pollId = data.get<std::string>("poll_id", ""); + result->voterChat = tryParseJson<Chat>(&TgTypeParser::parseJsonAndGetChat, data, "voter_chat"); result->user = tryParseJson<User>(&TgTypeParser::parseJsonAndGetUser, data, "user"); result->optionIds = parseJsonAndGetArray<std::int32_t>( [] (const boost::property_tree::ptree& innerData)->std::int32_t { @@ -792,8 +813,10 @@ std::string TgTypeParser::parsePollAnswer(const PollAnswer::Ptr& object) const { std::string result; result += '{'; appendToJson(result, "poll_id", object->pollId); + appendToJson(result, "voter_chat", parseChat(object->voterChat)); appendToJson(result, "user", parseUser(object->user)); - appendToJson(result, "option_ids", parseArray<std::int32_t>([] (std::int32_t i)->std::int32_t { + appendToJson(result, "option_ids", parseArray<std::int32_t>( + [] (std::int32_t i)->std::int32_t { return i; }, object->optionIds)); removeLastComma(result); @@ -983,7 +1006,7 @@ std::string TgTypeParser::parseForumTopicCreated(const ForumTopicCreated::Ptr& o return result; } -ForumTopicClosed::Ptr TgTypeParser::parseJsonAndGetForumTopicClosed(const boost::property_tree::ptree& data) const { +ForumTopicClosed::Ptr TgTypeParser::parseJsonAndGetForumTopicClosed(const boost::property_tree::ptree& /*data*/) const { auto result(std::make_shared<ForumTopicClosed>()); return result; } @@ -1019,7 +1042,7 @@ std::string TgTypeParser::parseForumTopicEdited(const ForumTopicEdited::Ptr& obj return result; } -ForumTopicReopened::Ptr TgTypeParser::parseJsonAndGetForumTopicReopened(const boost::property_tree::ptree& data) const { +ForumTopicReopened::Ptr TgTypeParser::parseJsonAndGetForumTopicReopened(const boost::property_tree::ptree& /*data*/) const { auto result(std::make_shared<ForumTopicReopened>()); return result; } @@ -1035,7 +1058,7 @@ std::string TgTypeParser::parseForumTopicReopened(const ForumTopicReopened::Ptr& return result; } -GeneralForumTopicHidden::Ptr TgTypeParser::parseJsonAndGetGeneralForumTopicHidden(const boost::property_tree::ptree& data) const { +GeneralForumTopicHidden::Ptr TgTypeParser::parseJsonAndGetGeneralForumTopicHidden(const boost::property_tree::ptree& /*data*/) const { auto result(std::make_shared<GeneralForumTopicHidden>()); return result; } @@ -1051,7 +1074,7 @@ std::string TgTypeParser::parseGeneralForumTopicHidden(const GeneralForumTopicHi return result; } -GeneralForumTopicUnhidden::Ptr TgTypeParser::parseJsonAndGetGeneralForumTopicUnhidden(const boost::property_tree::ptree& data) const { +GeneralForumTopicUnhidden::Ptr TgTypeParser::parseJsonAndGetGeneralForumTopicUnhidden(const boost::property_tree::ptree& /*data*/) const { auto result(std::make_shared<GeneralForumTopicUnhidden>()); return result; } @@ -1143,7 +1166,7 @@ std::string TgTypeParser::parseVideoChatScheduled(const VideoChatScheduled::Ptr& return result; } -VideoChatStarted::Ptr TgTypeParser::parseJsonAndGetVideoChatStarted(const boost::property_tree::ptree& data) const { +VideoChatStarted::Ptr TgTypeParser::parseJsonAndGetVideoChatStarted(const boost::property_tree::ptree& /*data*/) const { auto result(std::make_shared<VideoChatStarted>()); return result; } @@ -1154,6 +1177,7 @@ std::string TgTypeParser::parseVideoChatStarted(const VideoChatStarted::Ptr& obj } std::string result; result += '{'; + //removeLastComma(result); result += '}'; return result; } @@ -1805,7 +1829,7 @@ std::string TgTypeParser::parseChatMemberAdministrator(const ChatMemberAdministr return result; } -ChatMemberMember::Ptr TgTypeParser::parseJsonAndGetChatMemberMember(const boost::property_tree::ptree& data) const { +ChatMemberMember::Ptr TgTypeParser::parseJsonAndGetChatMemberMember(const boost::property_tree::ptree& /*data*/) const { // NOTE: This function will be called by parseJsonAndGetChatMember(). auto result(std::make_shared<ChatMemberMember>()); return result; @@ -1871,7 +1895,7 @@ std::string TgTypeParser::parseChatMemberRestricted(const ChatMemberRestricted:: return result; } -ChatMemberLeft::Ptr TgTypeParser::parseJsonAndGetChatMemberLeft(const boost::property_tree::ptree& data) const { +ChatMemberLeft::Ptr TgTypeParser::parseJsonAndGetChatMemberLeft(const boost::property_tree::ptree& /*data*/) const { // NOTE: This function will be called by parseJsonAndGetChatMember(). auto result(std::make_shared<ChatMemberLeft>()); return result; @@ -2126,7 +2150,7 @@ std::string TgTypeParser::parseBotCommandScope(const BotCommandScope::Ptr& objec return result; } -BotCommandScopeDefault::Ptr TgTypeParser::parseJsonAndGetBotCommandScopeDefault(const boost::property_tree::ptree& data) const { +BotCommandScopeDefault::Ptr TgTypeParser::parseJsonAndGetBotCommandScopeDefault(const boost::property_tree::ptree& /*data*/) const { // NOTE: This function will be called by parseJsonAndGetBotCommandScope(). auto result(std::make_shared<BotCommandScopeDefault>()); return result; @@ -2143,7 +2167,7 @@ std::string TgTypeParser::parseBotCommandScopeDefault(const BotCommandScopeDefau return result; } -BotCommandScopeAllPrivateChats::Ptr TgTypeParser::parseJsonAndGetBotCommandScopeAllPrivateChats(const boost::property_tree::ptree& data) const { +BotCommandScopeAllPrivateChats::Ptr TgTypeParser::parseJsonAndGetBotCommandScopeAllPrivateChats(const boost::property_tree::ptree& /*data*/) const { // NOTE: This function will be called by parseJsonAndGetBotCommandScope(). auto result(std::make_shared<BotCommandScopeAllPrivateChats>()); return result; @@ -2160,7 +2184,7 @@ std::string TgTypeParser::parseBotCommandScopeAllPrivateChats(const BotCommandSc return result; } -BotCommandScopeAllGroupChats::Ptr TgTypeParser::parseJsonAndGetBotCommandScopeAllGroupChats(const boost::property_tree::ptree& data) const { +BotCommandScopeAllGroupChats::Ptr TgTypeParser::parseJsonAndGetBotCommandScopeAllGroupChats(const boost::property_tree::ptree& /*data*/) const { // NOTE: This function will be called by parseJsonAndGetBotCommandScope(). auto result(std::make_shared<BotCommandScopeAllGroupChats>()); return result; @@ -2177,7 +2201,7 @@ std::string TgTypeParser::parseBotCommandScopeAllGroupChats(const BotCommandScop return result; } -BotCommandScopeAllChatAdministrators::Ptr TgTypeParser::parseJsonAndGetBotCommandScopeAllChatAdministrators(const boost::property_tree::ptree& data) const { +BotCommandScopeAllChatAdministrators::Ptr TgTypeParser::parseJsonAndGetBotCommandScopeAllChatAdministrators(const boost::property_tree::ptree& /*data*/) const { // NOTE: This function will be called by parseJsonAndGetBotCommandScope(). auto result(std::make_shared<BotCommandScopeAllChatAdministrators>()); return result; @@ -2338,7 +2362,7 @@ std::string TgTypeParser::parseMenuButton(const MenuButton::Ptr& object) const { return result; } -MenuButtonCommands::Ptr TgTypeParser::parseJsonAndGetMenuButtonCommands(const boost::property_tree::ptree& data) const { +MenuButtonCommands::Ptr TgTypeParser::parseJsonAndGetMenuButtonCommands(const boost::property_tree::ptree& /*data*/) const { // NOTE: This function will be called by parseJsonAndGetMenuButton(). auto result(std::make_shared<MenuButtonCommands>()); return result; @@ -2376,7 +2400,7 @@ std::string TgTypeParser::parseMenuButtonWebApp(const MenuButtonWebApp::Ptr& obj return result; } -MenuButtonDefault::Ptr TgTypeParser::parseJsonAndGetMenuButtonDefault(const boost::property_tree::ptree& data) const { +MenuButtonDefault::Ptr TgTypeParser::parseJsonAndGetMenuButtonDefault(const boost::property_tree::ptree& /*data*/) const { // NOTE: This function will be called by parseJsonAndGetMenuButton(). auto result(std::make_shared<MenuButtonDefault>()); return result; @@ -4409,7 +4433,7 @@ std::string TgTypeParser::parseGame(const Game::Ptr& object) const { return result; } -CallbackGame::Ptr TgTypeParser::parseJsonAndGetCallbackGame(const boost::property_tree::ptree& data) const { +CallbackGame::Ptr TgTypeParser::parseJsonAndGetCallbackGame(const boost::property_tree::ptree& /*data*/) const { auto result(std::make_shared<CallbackGame>()); return result; } @@ -4420,6 +4444,7 @@ std::string TgTypeParser::parseCallbackGame(const CallbackGame::Ptr& object) con } std::string result; result += '{'; + //removeLastComma(result); result += '}'; return result; } |