Use the same poll options as in Android client.

GitOrigin-RevId: bb8527d1a67872686028c38c27352e2632eb9711
This commit is contained in:
levlam 2019-02-21 22:37:15 +03:00
parent 4a4c8bd534
commit 559aca6cec
2 changed files with 2 additions and 2 deletions

View File

@ -1763,7 +1763,7 @@ static Result<InputMessageContent> 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)) {

View File

@ -220,7 +220,7 @@ PollId PollManager::create_poll(string &&question, vector<string> &&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<char>(pos++));
poll->options.push_back(std::move(option));
}