Browse Source

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.
closed-social-glitch-2
Thibaut Girka 6 years ago
committed by ThibG
parent
commit
8729f5e466
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/services/post_status_service.rb

+ 1
- 1
app/services/post_status_service.rb 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,

Loading…
Cancel
Save