media_ids: status_params[:media_ids],
sensitive: status_params[:sensitive],
spoiler_text: status_params[:spoiler_text],
- poll: status_params[:poll]
+ poll: status_params[:poll],
+ content_type: status_params[:content_type]
)
render json: @status, serializer: REST::StatusSerializer
spoiler_text: spoiler_text,
media_attachments_changed: media_attachments_changed,
account_id: account_id || self.account_id,
+ content_type: content_type,
created_at: at_time || edited_at
)
end
# @option options [String] :spoiler_text
# @option options [Boolean] :sensitive
# @option options [String] :language
+ # @option options [String] :content_type
def call(status, account_id, options = {})
@status = status
@options = options
@status.spoiler_text = @options[:spoiler_text] || ''
@status.sensitive = @options[:sensitive] || @options[:spoiler_text].present?
@status.language = valid_locale_or_nil(@options[:language] || @status.language || @status.account.user&.preferred_posting_language || I18n.default_locale)
+ @status.content_type = @options[:content_type] || @status.content_type
@status.edited_at = Time.now.utc
@status.save!