diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index c9b71e49ba..84660b05e6 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -263,12 +263,14 @@ export class NoteCreateService implements OnApplicationShutdown { const sensitiveWords = meta.sensitiveWords; if (this.utilityService.isKeyWordIncluded(data.cw ?? data.text ?? '', sensitiveWords)) { data.visibility = 'home'; + this.logger.warn('Visibility changed to home because sensitive words are included', { user: user.id, note: data }); } else if ((await this.roleService.getUserPolicies(user.id)).canPublicNote === false) { data.visibility = 'home'; } } if (this.utilityService.isKeyWordIncluded(data.cw ?? data.text ?? '', meta.prohibitedWords)) { + this.logger.error('Request rejected because prohibited words are included', { user: user.id, note: data }); throw new IdentifiableError('057d8d3e-b7ca-4f8b-b38c-dcdcbf34dc30'); }