diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index e540654b..712b2436 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -115,7 +115,7 @@ const PostStatusForm = {
? this.copyMessageScope
: this.$store.state.users.currentUser.default_scope
- const { postContentType: contentType, sensitiveByDefault } = this.$store.getters.mergedConfig
+ const { postContentType: contentType, sensitiveByDefault, sensitiveIfSubject } = this.$store.getters.mergedConfig
return {
dropFiles: [],
@@ -272,6 +272,8 @@ const PostStatusForm = {
if (this.preview) this.previewStatus()
},
async postStatus (event, newStatus, opts = {}) {
+ const { sensitiveIfSubject } = this.$store.getters.mergedConfig
+
if (this.posting && !this.optimisticPosting) { return }
if (this.disableSubmit) { return }
if (this.emojiInputShown) { return }
@@ -307,7 +309,7 @@ const PostStatusForm = {
status: newStatus.status,
spoilerText: newStatus.spoilerText || null,
visibility: newStatus.visibility,
- sensitive: newStatus.nsfw,
+ sensitive: (newStatus.nsfw || (sensitiveIfSubject && newStatus.spoilerText)),
media: newStatus.files,
store: this.$store,
inReplyToStatusId: this.replyTo,
diff --git a/src/components/settings_modal/tabs/general_tab.vue b/src/components/settings_modal/tabs/general_tab.vue
index 9228c78e..2125dc32 100644
--- a/src/components/settings_modal/tabs/general_tab.vue
+++ b/src/components/settings_modal/tabs/general_tab.vue
@@ -152,6 +152,11 @@
{{ $t('settings.sensitive_by_default') }}
+
+
+ {{ $t('settings.sensitive_if_subject') }}
+
+
{{ $t('settings.autohide_floating_post_button') }}
diff --git a/src/i18n/en.json b/src/i18n/en.json
index 18b9accc..5827535d 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -443,6 +443,7 @@
"subject_line_noop": "Do not copy",
"post_status_content_type": "Post status content type",
"sensitive_by_default": "Mark posts as sensitive by default",
+ "sensitive_if_subject": "Automatically mark images as sensitive if a subject line is specified",
"stop_gifs": "Play-on-hover GIFs",
"streaming": "Enable automatic streaming of new posts when scrolled to the top",
"user_mutes": "Users",
diff --git a/src/i18n/ja_pedantic.json b/src/i18n/ja_pedantic.json
index 9074f4bf..6bf45139 100644
--- a/src/i18n/ja_pedantic.json
+++ b/src/i18n/ja_pedantic.json
@@ -575,6 +575,7 @@
"setting_changed": "規定の設定と異なっています",
"greentext": "引用を緑色で表示",
"sensitive_by_default": "はじめから投稿をセンシティブとして設定",
+ "sensitive_if_subject": "ステータスにサブジェクトをついたらNSFWにする",
"more_settings": "その他の設定",
"reply_visibility_self_short": "自分宛のリプライを見る",
"reply_visibility_following_short": "フォローしている人に宛てられたリプライを見る",
diff --git a/src/modules/config.js b/src/modules/config.js
index f98e6649..9c8d2196 100644
--- a/src/modules/config.js
+++ b/src/modules/config.js
@@ -68,7 +68,8 @@ export const defaultState = {
hidePostStats: undefined, // instance default
hideUserStats: undefined, // instance default
virtualScrolling: undefined, // instance default
- sensitiveByDefault: undefined // instance default
+ sensitiveByDefault: undefined, // instance default
+ sensitiveIfSubject: undefined
}
// caching the instance default properties
diff --git a/src/modules/instance.js b/src/modules/instance.js
index 96de73ca..8b7894df 100644
--- a/src/modules/instance.js
+++ b/src/modules/instance.js
@@ -44,6 +44,7 @@ const defaultState = {
theme: 'pleroma-dark',
virtualScrolling: true,
sensitiveByDefault: false,
+ sensitiveIfSubject: false,
// Nasty stuff
customEmoji: [],