Permit post has media_attachments and polls
This commit is contained in:
parent
7e8253e87b
commit
081439a7dd
4 changed files with 3 additions and 8 deletions
|
@ -155,7 +155,7 @@ class PostStatusService < BaseService
|
|||
return
|
||||
end
|
||||
|
||||
raise Mastodon::ValidationError, I18n.t('media_attachments.validations.too_many') if @options[:media_ids].size > MediaAttachment::LOCAL_STATUS_ATTACHMENT_MAX || @options[:poll].present?
|
||||
raise Mastodon::ValidationError, I18n.t('media_attachments.validations.too_many') if @options[:media_ids].size > MediaAttachment::LOCAL_STATUS_ATTACHMENT_MAX
|
||||
|
||||
@media = @account.media_attachments.where(status_id: nil).where(id: @options[:media_ids].take(MediaAttachment::LOCAL_STATUS_ATTACHMENT_MAX).map(&:to_i))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue