From b3dd0d276d52042828e11bf325015f5d7f4624ca Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 13 Sep 2019 22:32:19 +0200 Subject: [PATCH] Increase poll option length limit to 100 chars, number of options to 5 --- .../mastodon/features/compose/components/poll_form.js | 4 ++-- app/validators/poll_validator.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/javascript/mastodon/features/compose/components/poll_form.js b/app/javascript/mastodon/features/compose/components/poll_form.js index 211601d520..bdccf9ce76 100644 --- a/app/javascript/mastodon/features/compose/components/poll_form.js +++ b/app/javascript/mastodon/features/compose/components/poll_form.js @@ -77,7 +77,7 @@ class Option extends React.PureComponent {
- {options.size < 4 && ( + {options.size < 5 && ( )} diff --git a/app/validators/poll_validator.rb b/app/validators/poll_validator.rb index 9d7321cad6..8259a62e56 100644 --- a/app/validators/poll_validator.rb +++ b/app/validators/poll_validator.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true class PollValidator < ActiveModel::Validator - MAX_OPTIONS = 4 - MAX_OPTION_CHARS = 25 + MAX_OPTIONS = 5 + MAX_OPTION_CHARS = 100 MAX_EXPIRATION = 1.month.freeze MIN_EXPIRATION = 5.minutes.freeze