diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/form/admin_settings.rb | 2 | ||||
-rw-r--r-- | app/models/trends/statuses.rb | 2 | ||||
-rw-r--r-- | app/views/admin/settings/edit.html.haml | 3 |
3 files changed, 6 insertions, 1 deletions
diff --git a/app/models/form/admin_settings.rb b/app/models/form/admin_settings.rb index 34f14e312..5627f8a84 100644 --- a/app/models/form/admin_settings.rb +++ b/app/models/form/admin_settings.rb @@ -35,6 +35,7 @@ class Form::AdminSettings show_replies_in_public_timelines trends trendable_by_default + trending_status_cw show_domain_blocks show_domain_blocks_rationale noindex @@ -57,6 +58,7 @@ class Form::AdminSettings show_replies_in_public_timelines trends trendable_by_default + trending_status_cw noindex require_invite_text captcha_enabled diff --git a/app/models/trends/statuses.rb b/app/models/trends/statuses.rb index e785413ec..e9c48a06b 100644 --- a/app/models/trends/statuses.rb +++ b/app/models/trends/statuses.rb @@ -93,7 +93,7 @@ class Trends::Statuses < Trends::Base original_status.public_visibility? && original_status.account.discoverable? && !original_status.account.silenced? && - original_status.spoiler_text.blank? && !original_status.sensitive? && !original_status.reply? + (original_status.spoiler_text.blank? || Setting.trending_status_cw) && !original_status.sensitive? && !original_status.reply? end def calculate_scores(statuses, at_time) diff --git a/app/views/admin/settings/edit.html.haml b/app/views/admin/settings/edit.html.haml index 49b03a9e3..a287e52ff 100644 --- a/app/views/admin/settings/edit.html.haml +++ b/app/views/admin/settings/edit.html.haml @@ -87,6 +87,9 @@ = f.input :trendable_by_default, as: :boolean, wrapper: :with_label, label: t('admin.settings.trendable_by_default.title'), hint: t('admin.settings.trendable_by_default.desc_html') .fields-group + = f.input :trending_status_cw, as: :boolean, wrapper: :with_label, label: t('admin.settings.trending_status_cw.title'), hint: t('trending_status_cw.desc_html') + + .fields-group = f.input :noindex, as: :boolean, wrapper: :with_label, label: t('admin.settings.default_noindex.title'), hint: t('admin.settings.default_noindex.desc_html') .fields-group |