From fd2e3d53eba0e6cb2cedc1a89e3d9b2b905ceb8c Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 11 Jun 2026 10:03:10 +0200 Subject: [PATCH] Fix inconsistent check on post edition when there is both a poll and attachments (#39368) --- app/services/update_status_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/update_status_service.rb b/app/services/update_status_service.rb index ac79dd6807..1f2dce08f8 100644 --- a/app/services/update_status_service.rb +++ b/app/services/update_status_service.rb @@ -69,7 +69,7 @@ class UpdateStatusService < BaseService def validate_media! return [] if @options[:media_ids].blank? || !@options[:media_ids].is_a?(Enumerable) - raise Mastodon::ValidationError, I18n.t('media_attachments.validations.too_many') if @options[:media_ids].size > Status::MEDIA_ATTACHMENTS_LIMIT || @options[:poll].present? + raise Mastodon::ValidationError, I18n.t('media_attachments.validations.too_many') if @options[:media_ids].size > Status::MEDIA_ATTACHMENTS_LIMIT media_attachments = @status.account.media_attachments.where(status_id: [nil, @status.id]).where(scheduled_status_id: nil).where(id: @options[:media_ids].take(Status::MEDIA_ATTACHMENTS_LIMIT).map(&:to_i)).to_a