summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Api.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Api.cpp b/src/Api.cpp
index 55c0320..c882304 100644
--- a/src/Api.cpp
+++ b/src/Api.cpp
@@ -38,7 +38,11 @@ User::Ptr Api::getMe() const {
return TgTypeParser::getInstance().parseJsonAndGetUser(sendRequest("getMe"));
}
+<<<<<<< HEAD
+Message::Ptr Api::sendMessage(int64_t chatId, const string& text, bool disableWebPagePreview, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, const string& parseMode) const {
+=======
Message::Ptr Api::sendMessage(int64_t chatId, const string& text, bool disableWebPagePreview, int32_t replyToMessageId, const GenericReply::Ptr& replyMarkup, bool disableNotification) const {
+>>>>>>> 9ba69d7e87c9b8ff9997294b68550852ef0274b8
vector<HttpReqArg> args;
args.push_back(HttpReqArg("chat_id", chatId));
args.push_back(HttpReqArg("text", text));
@@ -54,6 +58,9 @@ Message::Ptr Api::sendMessage(int64_t chatId, const string& text, bool disableWe
if (replyMarkup) {
args.push_back(HttpReqArg("reply_markup", TgTypeParser::getInstance().parseGenericReply(replyMarkup)));
}
+ if (!parseMode.empty()) {
+ args.push_back(HttpReqArg("parse_mode", parseMode));
+ }
return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendMessage", args));
}