]> cat aescling's git repositories - mastodon.git/commit
Fix media not being marked sensitive when client sets a CW but no text (#13277)
authorThibG <thib@sitedethib.com>
Wed, 25 Mar 2020 21:40:58 +0000 (22:40 +0100)
committerGitHub <noreply@github.com>
Wed, 25 Mar 2020 21:40:58 +0000 (22:40 +0100)
commitf08f880f584271a922a0d8d3759e634d67947d12
tree71b651db208da3c374ad6aab5520524dd890d722
parent858d0dd168b737a77506d6aa00f6ed582d0e33c6
Fix media not being marked sensitive when client sets a CW but no text (#13277)

Mastodon enforces the “sensitive” flag on media attachments whenever a toot
is posted with a Content Warning. However, it does so *after* potentially
converting the Content Warning to toot text (when there is no toot text),
which leads to inconsistent and surprising behavior for API clients.
This commit fixes this inconsistency.
app/services/post_status_service.rb
spec/services/post_status_service_spec.rb