Browse Source

匿名评论有简单数字代号

pull/4/head
欧醚 4 years ago
parent
commit
bb9c5f822e
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      app/controllers/api/v1/statuses_controller.rb

+ 3
- 1
app/controllers/api/v1/statuses_controller.rb View File

@ -40,8 +40,10 @@ 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]
@status = PostStatusService.new.call(sender,
text: status_params[:status],
text: st_text,
thread: thread,
media_ids: status_params[:media_ids],
sensitive: status_params[:sensitive],

Loading…
Cancel
Save