From 559aca6cec9cbea7ae827194824927f233973ea2 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 21 Feb 2019 22:37:15 +0300 Subject: [PATCH] Use the same poll options as in Android client. GitOrigin-RevId: bb8527d1a67872686028c38c27352e2632eb9711 --- td/telegram/MessageContent.cpp | 2 +- td/telegram/PollManager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index 0c4f67d28..99a7bd5b0 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -1763,7 +1763,7 @@ static Result create_input_message_content( return Status::Error(400, "Poll must have at least 1 option"); } if (input_poll->options_.size() > MAX_POLL_OPTIONS) { - return Status::Error(400, PSLICE() << "Poll can't have more than " << MAX_POLL_OPTIONS << " option"); + return Status::Error(400, PSLICE() << "Poll can't have more than " << MAX_POLL_OPTIONS << " options"); } for (auto &option : input_poll->options_) { if (!clean_input_string(option)) { diff --git a/td/telegram/PollManager.cpp b/td/telegram/PollManager.cpp index 9488edcf4..db6691b53 100644 --- a/td/telegram/PollManager.cpp +++ b/td/telegram/PollManager.cpp @@ -220,7 +220,7 @@ PollId PollManager::create_poll(string &&question, vector &&options) { for (auto &option_text : options) { PollOption option; option.text = std::move(option_text); - option.data = to_string(pos++); + option.data = string(1, narrow_cast(pos++)); poll->options.push_back(std::move(option)); }