diff --git a/app/controllers/api/v1/statuses_controller.rb b/app/controllers/api/v1/statuses_controller.rb index a3c6e30ea..7018010b2 100644 --- a/app/controllers/api/v1/statuses_controller.rb +++ b/app/controllers/api/v1/statuses_controller.rb @@ -39,8 +39,9 @@ class Api::V1::StatusesController < Api::BaseController def create 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 - st_text = thread && thread.account.username == 'tree_hole_bot' ? ("$#{(7919**(current_account.id+100) % 10000000007).to_s(16)}: " + status_params[:status][0..4900]) : status_params[:status] + masked = status_params[:status].end_with?('[mask]') + sender = masked ? Account.find_local('mask_bot') : current_account + st_text = masked ? ("$#{(7919**(current_account.id+100) % 10000000007).to_s(16)}: " + status_params[:status][0..4900]) : status_params[:status] @status = PostStatusService.new.call(sender, text: st_text,