From 32ff30f11c4cb94525643612ffd9a345384adfd7 Mon Sep 17 00:00:00 2001 From: Holly Date: Wed, 31 Jan 2024 00:17:01 +0000 Subject: [PATCH] poll options --- .../flavours/glitch/features/compose/components/poll_form.jsx | 1 + app/validators/poll_validator.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx b/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx index 2ba9f6db64..34dcce9910 100644 --- a/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx +++ b/app/javascript/flavours/glitch/features/compose/components/poll_form.jsx @@ -164,6 +164,7 @@ class PollForm extends ImmutablePureComponent { + diff --git a/app/validators/poll_validator.rb b/app/validators/poll_validator.rb index 8cac4f8d7b..8b74094b80 100644 --- a/app/validators/poll_validator.rb +++ b/app/validators/poll_validator.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class PollValidator < ActiveModel::Validator - MAX_OPTIONS = (ENV['MAX_POLL_OPTIONS'] || 5).to_i + MAX_OPTIONS = (ENV['MAX_POLL_OPTIONS'] || 30).to_i MAX_OPTION_CHARS = (ENV['MAX_POLL_OPTION_CHARS'] || 100).to_i MAX_EXPIRATION = 1.month.freeze MIN_EXPIRATION = 5.minutes.freeze