diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index 16114c30..97c4f283 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -11,7 +11,7 @@ const Attachment = { ], data () { return { - nsfwImage, + nsfwImage: this.$store.state.config.nsfwCensorImage || nsfwImage, hideNsfwLocal: this.$store.state.config.hideNsfw, preloadImage: this.$store.state.config.preloadImage, loopVideo: this.$store.state.config.loopVideo, diff --git a/src/main.js b/src/main.js index bf92e78e..6ce2df13 100644 --- a/src/main.js +++ b/src/main.js @@ -60,6 +60,9 @@ const registerPushNotifications = store => { if (isUserMutation && vapidPublicKey && permission) { return store.dispatch('registerPushNotifications') } + if (data['nsfwCensorImage']) { + store.dispatch('setOption', { name: 'nsfwCensorImage', value: data['nsfwCensorImage'] }) + } const user = state.users.currentUser const isVapidMutation = mutation.type === 'setInstanceOption' && mutation.payload.name === 'vapidPublicKey'