diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-04-18 15:08:55 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:22 -0500 |
commit | 71302f6dec5bba30f9175052d56c4ec43cd7bdfb (patch) | |
tree | e8c23277fd3b86aa69f60f11078b0930c0569e46 /app/services | |
parent | ea40ae8de79743bebcccc866717748a0a7739d11 (diff) |
Handle up to 6 attachments per roar.
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/post_status_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index c2584e090..97ba26ddc 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -103,9 +103,9 @@ class PostStatusService < 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 > 4 || @options[:poll].present? + raise Mastodon::ValidationError, I18n.t('media_attachments.validations.too_many') if @options[:media_ids].size > 6 || @options[:poll].present? - @media = @account.media_attachments.where(status_id: nil).where(id: @options[:media_ids].take(4).map(&:to_i)) + @media = @account.media_attachments.where(status_id: nil).where(id: @options[:media_ids].take(6).map(&:to_i)) raise Mastodon::ValidationError, I18n.t('media_attachments.validations.images_and_video') if @media.size > 1 && @media.find(&:video?) end |