From 5d84d4cb291e5a93d512ddf51f24fa6964e6e4cd Mon Sep 17 00:00:00 2001 From: llnulldisk <48621230+llnulldisk@users.noreply.github.com> Date: Tue, 30 Aug 2022 21:58:26 +0200 Subject: Restore the order of parameters in sendMessage --- src/Api.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'src/Api.cpp') diff --git a/src/Api.cpp b/src/Api.cpp index 24ae56f..9cb7f6e 100644 --- a/src/Api.cpp +++ b/src/Api.cpp @@ -84,9 +84,9 @@ User::Ptr Api::getMe() const { return _tgTypeParser.parseJsonAndGetUser(sendRequest("getMe")); } -Message::Ptr Api::sendMessage(boost::variant chatId, const std::string& text, const std::string& parseMode, - bool disableWebPagePreview, bool disableNotification, std::int32_t replyToMessageId, - GenericReply::Ptr replyMarkup) const { +Message::Ptr Api::sendMessage(boost::variant chatId, const std::string& text, bool disableWebPagePreview, + std::int32_t replyToMessageId, GenericReply::Ptr replyMarkup, const std::string& parseMode, + bool disableNotification) const { vector args; args.reserve(7); @@ -111,20 +111,6 @@ Message::Ptr Api::sendMessage(boost::variant c return _tgTypeParser.parseJsonAndGetMessage(sendRequest("sendMessage", args)); } -Message::Ptr Api::sendMessage(const std::string& chatId, const std::string& text, bool disableWebPagePreview, - std::int32_t replyToMessageId, GenericReply::Ptr replyMarkup, const std::string& parseMode, - bool disableNotification) const { - - return sendMessage(chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup); -} - -Message::Ptr Api::sendMessage(std::int64_t chatId, const std::string& text, bool disableWebPagePreview, - std::int32_t replyToMessageId, GenericReply::Ptr replyMarkup, const std::string& parseMode, - bool disableNotification) const { - - return sendMessage(chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup); -} - Message::Ptr Api::forwardMessage(std::int64_t chatId, std::int64_t fromChatId, std::int32_t messageId, bool disableNotification) const { vector args; args.reserve(4); -- cgit v1.2.3