From 4322253d84e382c3e1559ab1eb59105be175eae0 Mon Sep 17 00:00:00 2001 From: Ember Date: Thu, 18 Jan 2024 04:10:42 +1100 Subject: [PATCH] hell-ware --- app/javascript/flavours/glitch/components/admin/Retention.jsx | 2 +- app/models/media_attachment.rb | 2 +- app/validators/poll_validator.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/components/admin/Retention.jsx b/app/javascript/flavours/glitch/components/admin/Retention.jsx index 768dae1559097a..e9f0ea2e0f813a 100644 --- a/app/javascript/flavours/glitch/components/admin/Retention.jsx +++ b/app/javascript/flavours/glitch/components/admin/Retention.jsx @@ -51,7 +51,7 @@ export default class Retention extends PureComponent { let content; if (loading) { - content = ; + content = ; } else { content = ( diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb index 184d0904c0f547..40b7c82d50305e 100644 --- a/app/models/media_attachment.rb +++ b/app/models/media_attachment.rb @@ -114,7 +114,7 @@ class MediaAttachment < ApplicationRecord }.freeze VIDEO_PASSTHROUGH_OPTIONS = { - video_codecs: ['h264', 'av1'].freeze, + video_codecs: %w[h264 av1].freeze, audio_codecs: ['aac', 'opus', nil].freeze, colorspaces: ['yuv420p'].freeze, options: { diff --git a/app/validators/poll_validator.rb b/app/validators/poll_validator.rb index d63113bbb02f84..c5c6bb7bf789d6 100644 --- a/app/validators/poll_validator.rb +++ b/app/validators/poll_validator.rb @@ -9,7 +9,7 @@ class PollValidator < ActiveModel::Validator def validate(poll) current_time = Time.now.utc - poll.errors.add(:options, I18n.t('polls.errors.too_few_options')) unless poll.options.size > 0 + poll.errors.add(:options, I18n.t('polls.errors.too_few_options')) unless poll.options.size >= 1 poll.errors.add(:options, I18n.t('polls.errors.too_many_options', max: MAX_OPTIONS)) if poll.options.size > MAX_OPTIONS poll.errors.add(:options, I18n.t('polls.errors.over_character_limit', max: MAX_OPTION_CHARS)) if poll.options.any? { |option| option.mb_chars.grapheme_length > MAX_OPTION_CHARS } poll.errors.add(:options, I18n.t('polls.errors.duplicate_options')) unless poll.options.uniq.size == poll.options.size