Use the same poll options as in Android client.
GitOrigin-RevId: bb8527d1a67872686028c38c27352e2632eb9711
This commit is contained in:
parent
4a4c8bd534
commit
559aca6cec
@ -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)) {
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user