0
0
Fork 0

If an OStatus message contains nsfw hashtag, mark it as sensitive (#7398)

* If an OStatus message contains nsfw hashtag, mark it as sensitive

Undo parts of #7048

* Put nsfw hashtag on OStatus messages if they have any media

* Fix code style issues
This commit is contained in:
Eugen Rochko 2018-05-07 14:49:13 +02:00 committed by GitHub
parent 42cd363542
commit 6208ea5a53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -368,6 +368,7 @@ class OStatus::AtomSerializer
append_element(entry, 'link', nil, rel: :enclosure, type: media.file_content_type, length: media.file_file_size, href: full_asset_url(media.file.url(:original, false)))
end
append_element(entry, 'category', nil, term: 'nsfw') if status.sensitive? && status.media_attachments.any?
append_element(entry, 'mastodon:scope', status.visibility)
status.emojis.each do |emoji|