-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect the "sensitive" flag for posts #14162
Conversation
e32376e
to
29caa56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we keep both system.enable_cw
and system.display_sensitive
?
@@ -3440,8 +3439,8 @@ public static function prepareBody(array &$item, bool $attach = false, bool $is_ | |||
$filter_reasons[] = DI::l10n()->t('Content from %s is collapsed', $item['author-name']); | |||
} | |||
|
|||
if (!empty($item['content-warning']) && (!$uid || !DI::pConfig()->get($uid, 'system', 'disable_cw', false))) { | |||
$filter_reasons[] = DI::l10n()->t('Content warning: %s', $item['content-warning']); | |||
if ($item['sensitive'] && (!$uid || !DI::pConfig()->get($uid, 'system', 'disable_cw', false))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quid of the system. display_sensitive
pconfig key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
What should the other setting now control? |
|
There would be a third option as well: Collapse posts that marked as sensitive and that contain media. I would favour for possible a later PR introducing a new option that only collapses sensitive post when they contain media or a summary. |
You want a third option but you reduced the options to one in this PR, how about you leave the two current options for now until you introduce the third? |
|
Posts on for example Mastodon can be marked as "sensitive" in different ways. One is when a "content warning" is entered, but there are other ways as well, for example you can define your post as being "sensitive" in the Mastodon API without providing any data for the "spoiler_text" field: https://docs.joinmastodon.org/methods/statuses/#form-data-parameters
This field is now respected, when we display posts.
With this change we don't need to blur any pictures any more, when the post is set to sensitive:
When viewed:
When expanded: