fix: default sensitive not letting users unmark files

This commit is contained in:
Marie 2024-10-20 11:04:48 +02:00
parent ba17776b19
commit 65ac5fef46
No known key found for this signature in database
GPG key ID: 7ADF6C9CD9A28555
8 changed files with 35 additions and 5 deletions

View file

@ -560,7 +560,7 @@ export class DriveService {
file.maybeSensitive = info.sensitive;
file.maybePorn = info.porn;
file.isSensitive = user
? this.userEntityService.isLocalUser(user) && profile!.alwaysMarkNsfw ? true :
? this.userEntityService.isLocalUser(user) && (profile!.alwaysMarkNsfw || profile!.defaultSensitive) ? true :
sensitive ?? false
: false;

View file

@ -627,6 +627,7 @@ export class UserEntityService implements OnModuleInit {
injectFeaturedNote: profile!.injectFeaturedNote,
receiveAnnouncementEmail: profile!.receiveAnnouncementEmail,
alwaysMarkNsfw: profile!.alwaysMarkNsfw,
defaultSensitive: profile!.defaultSensitive,
autoSensitive: profile!.autoSensitive,
carefulBot: profile!.carefulBot,
autoAcceptFollowed: profile!.autoAcceptFollowed,