This commit is contained in:
H. Shay 2024-09-10 17:19:35 -07:00
parent f2e5ba8295
commit 1893b3c722
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ export class NsfwProtection extends Protection {
}
}
} else if (prediction["className"] === "Hentai"){
} else if (prediction["className"] === "Hentai") {
if (prediction["probability"] > mjolnir.config.nsfwSensitivity) {
await mjolnir.managementRoomOutput.logMessage(LogLevel.INFO, "NSFWProtection", `Redacting ${event["event_id"]} for inappropriate content.`);
try {

View File

@ -102,7 +102,7 @@ export class ProtectionManager {
protection.settings[key].setValue(value);
}
if (protection.enabled) {
if (protection.name == "NsfwProtection") {
if (protection.name === "NsfwProtection") {
(protection as NsfwProtection).initialize()
}
for (let roomId of this.mjolnir.protectedRoomsTracker.getProtectedRooms()) {