quote support to status creation

This commit is contained in:
2458773093 2019-07-30 03:26:35 +03:00
parent 318ab7beb6
commit 6b583577f4
2 changed files with 4 additions and 1 deletions

View File

@ -55,7 +55,8 @@ class Api::V1::StatusesController < Api::BaseController
application: doorkeeper_token.application,
poll: status_params[:poll],
idempotency: request.headers['Idempotency-Key'],
group_id: status_params[:group_id])
group_id: status_params[:group_id],
quote_of_id: status_params[:quote_of_id])
render json: @status, serializer: @status.is_a?(ScheduledStatus) ? REST::ScheduledStatusSerializer : REST::StatusSerializer
end
@ -82,6 +83,7 @@ class Api::V1::StatusesController < Api::BaseController
params.permit(
:status,
:in_reply_to_id,
:quote_of_id,
:sensitive,
:spoiler_text,
:visibility,

View File

@ -164,6 +164,7 @@ class PostStatusService < BaseService
{
text: @text,
group_id: @options[:group_id],
quote_of_id: @options[:quote_of_id],
media_attachments: @media || [],
thread: @in_reply_to,
poll_attributes: poll_attributes,