summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJellyBrick <shlee1503@naver.com>2018-06-22 21:32:41 +0900
committerJellyBrick <shlee1503@naver.com>2018-06-22 21:32:41 +0900
commit531b376681830f57634a69c22df841f5ee5e2e23 (patch)
tree79ec974d886ed0f5776011fd1ba8316f829fe2aa /src
parent4cc83d0ea36d4470123bdf77f881dffed9ebd4ac (diff)
Fix typo
Diffstat (limited to 'src')
-rw-r--r--src/Api.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Api.cpp b/src/Api.cpp
index cd9fac8..de697df 100644
--- a/src/Api.cpp
+++ b/src/Api.cpp
@@ -229,7 +229,7 @@ Message::Ptr Api::sendDocument(int64_t chatId, const string& document, const str
return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendDocument", args));
}
-Message::Ptr sendInvoice(int64_t chatId, const std::string& title, const std::string& description, const std::string& payload,
+Message::Ptr Api::sendInvoice(int64_t chatId, const std::string& title, const std::string& description, const std::string& payload,
const std::string& providerToken, const std::string& startParameter, const std::string& currency, const std::vector<LabeledPrice>& prices,
const std::string& providerData, const std::string& photoUrl, int32_t photoSize,
int32_t photoWidth, int32_t photoHeight, bool needName,
@@ -294,12 +294,12 @@ Message::Ptr sendInvoice(int64_t chatId, const std::string& title, const std::st
return TgTypeParser::getInstance().parseJsonAndGetMessage(sendRequest("sendInvoice", args));
}
-bool answerShippingQuery(const std::string& shippingQueryId, bool ok, const std::vector<ShippingOption>& shippingOptions, const std::string& errorMessage) const {
+bool Api::answerShippingQuery(const std::string& shippingQueryId, bool ok, const std::vector<ShippingOption>& shippingOptions, const std::string& errorMessage) const {
vector<HttpReqArg> args;
args.reserve(4);
args.emplace_back("shipping_query_id", shippingQueryId);
args.emplace_back("ok", ok);
- if (ShippingOptions != nullptr) {
+ if (!shippingOptions.empty()) {
args.emplace_back("shipping_options", TgTypeParser::getInstance().parseArray<ShippingOption>(&TgTypeParser::parseShippingOption, shippingOptions));
}
if (!errorMessage.empty()) {
@@ -308,10 +308,10 @@ bool answerShippingQuery(const std::string& shippingQueryId, bool ok, const std:
return sendRequest("answerShippingQuery", args).get<bool>("", false);
}
-bool answerPreCheckoutQuery(const std::string& preCheckoutQueryId, bool ok, const std::string& errorMessage) const {
+bool Api::answerPreCheckoutQuery(const std::string& preCheckoutQueryId, bool ok, const std::string& errorMessage) const {
vector<HttpReqArg> args;
args.reserve(3);
- args.emplace_back("shipping_query_id", shippingQueryId);
+ args.emplace_back("pre_checkout_query_id", preCheckoutQueryId);
args.emplace_back("ok", ok);
if (!errorMessage.empty()) {
args.emplace_back("error_message", errorMessage);