瀏覽代碼

For now, put a "." into no-text statuses with media for backcompat (#6691)

master
Eugen Rochko 6 年之前
committed by GitHub
父節點
當前提交
510c9049c7
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 1 行新增0 行删除
  1. +1
    -0
      app/services/post_status_service.rb

+ 1
- 0
app/services/post_status_service.rb 查看文件

@@ -22,6 +22,7 @@ class PostStatusService < BaseService
media = validate_media!(options[:media_ids])
status = nil
text = options.delete(:spoiler_text) if text.blank? && options[:spoiler_text].present?
text = '.' if text.blank? && !media.empty?

ApplicationRecord.transaction do
status = account.statuses.create!(text: text,


Loading…
取消
儲存