Do not move CWs to toot body when toot body is empty

Fixes #395

Instead of leaving the toot body blank, it replaces it with a single “.” in
order for the fold/unfold CW behavior to not look *too* weird on upstream
Mastodon. Note that this does not fix upstream's CW-dropping behavior, as
that is decided at the time the toot is posted, not received.
This commit is contained in:
Thibaut Girka 2018-10-20 17:19:32 +02:00 committed by ThibG
parent 04bedd237b
commit 8729f5e466
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,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? && options[:spoiler_text].present?
ApplicationRecord.transaction do
status = account.statuses.create!(text: text,