merge: upstream

This commit is contained in:
Marie 2023-12-28 09:54:32 +01:00
parent c4534b20bb
commit 592027cf68
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
5 changed files with 44 additions and 24 deletions

View file

@ -253,7 +253,7 @@ export class NoteCreateService implements OnApplicationShutdown {
if (data.visibility === 'public' && data.channel == null) {
const sensitiveWords = meta.sensitiveWords;
if (this.isSensitive(data, sensitiveWords)) {
if (this.utilityService.isSensitiveWordIncluded(data.cw ?? data.text ?? '', sensitiveWords)) {
data.visibility = 'home';
} else if ((await this.roleService.getUserPolicies(user.id)).canPublicNote === false) {
data.visibility = 'home';