|
|
@ -34,9 +34,11 @@ class Api::V1::StatusesController < Api::BaseController |
|
|
|
end |
|
|
|
|
|
|
|
def create |
|
|
|
@status = PostStatusService.new.call(current_user.account, |
|
|
|
thread = status_params[:in_reply_to_id].blank? ? nil : Status.find(status_params[:in_reply_to_id]) |
|
|
|
sender = thread && thread.account.username == 'tree_hole_bot' ? thread.account : current_account |
|
|
|
@status = PostStatusService.new.call(sender, |
|
|
|
text: status_params[:status], |
|
|
|
thread: status_params[:in_reply_to_id].blank? ? nil : Status.find(status_params[:in_reply_to_id]), |
|
|
|
thread: thread, |
|
|
|
media_ids: status_params[:media_ids], |
|
|
|
sensitive: status_params[:sensitive], |
|
|
|
spoiler_text: status_params[:spoiler_text], |
|
|
|