diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 2055a0d210..939662707f 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -368,6 +368,14 @@ export class NoteCreateService implements OnApplicationShutdown { } } + if (user.host && !data.cw) { + await this.federatedInstanceService.fetch(user.host).then(async i => { + if (i.isNSFW) { + data.cw = 'Instance is marked as NSFW'; + } + }); + } + const note = await this.insertNote(user, data, tags, emojis, mentionedUsers); setImmediate('post created', { signal: this.#shutdownController.signal }).then(