diff options
author | llnulldisk <48621230+llnulldisk@users.noreply.github.com> | 2022-10-05 11:35:04 +0200 |
---|---|---|
committer | llnulldisk <48621230+llnulldisk@users.noreply.github.com> | 2022-10-05 11:35:04 +0200 |
commit | d9615bbe41c830eb3941e3f6235d47b6a46e584d (patch) | |
tree | 8b810ade0742f78d7aee60f4e0d445b3eb70b08b | |
parent | 19f577d35bd5684a368c63c6a40f5d16dbc11fac (diff) |
sendPoll: update default value (#234)
-rw-r--r-- | include/tgbot/Api.h | 2 | ||||
-rw-r--r-- | src/Api.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/tgbot/Api.h b/include/tgbot/Api.h index a87435c..c811730 100644 --- a/include/tgbot/Api.h +++ b/include/tgbot/Api.h @@ -663,7 +663,7 @@ public: bool isAnonymous = true, const std::string& type = "", bool allowsMultipleAnswers = false, - std::int32_t correctOptionId = 0, + std::int32_t correctOptionId = -1, const std::string& explanation = "", const std::string& explanationParseMode = "", const std::vector<MessageEntity::Ptr>& explanationEntities = std::vector<MessageEntity::Ptr>(), diff --git a/src/Api.cpp b/src/Api.cpp index e13fa7c..ed1f07a 100644 --- a/src/Api.cpp +++ b/src/Api.cpp @@ -914,7 +914,7 @@ Message::Ptr Api::sendPoll(boost::variant<std::int64_t, const std::string&> chat if (allowsMultipleAnswers) { args.emplace_back("allows_multiple_answers", allowsMultipleAnswers); } - if (correctOptionId != 0) { + if (correctOptionId != -1) { args.emplace_back("correct_option_id", correctOptionId); } if (!explanation.empty()) { |