From d162418be5288edcca7483acac089c2ff6da130e Mon Sep 17 00:00:00 2001 From: Tiago R Date: Wed, 27 Dec 2023 18:38:26 +0000 Subject: [PATCH] Add missing dependency to mutes plugin & fix timeout expiry (#430) * +debug Signed-off-by: GitHub * Revert "+debug" This reverts commit 83daee09d9e63ad0c162f4ec30d42b03ab4bdc7f. * add missing dependency to mutes Signed-off-by: GitHub * lower max timeout duration Signed-off-by: GitHub --------- Signed-off-by: GitHub --- backend/src/data/Mutes.ts | 2 +- backend/src/plugins/Mutes/MutesPlugin.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/data/Mutes.ts b/backend/src/data/Mutes.ts index ec7f11ccd..ad50dcee4 100644 --- a/backend/src/data/Mutes.ts +++ b/backend/src/data/Mutes.ts @@ -8,7 +8,7 @@ import { Mute } from "./entities/Mute"; const OLD_EXPIRED_MUTE_THRESHOLD = 7 * DAYS; -export const MAX_TIMEOUT_DURATION = 28 * DAYS; +export const MAX_TIMEOUT_DURATION = 27 * DAYS; // When a timeout is under this duration but the mute expires later, the timeout will be reset to max duration export const TIMEOUT_RENEWAL_THRESHOLD = 21 * DAYS; diff --git a/backend/src/plugins/Mutes/MutesPlugin.ts b/backend/src/plugins/Mutes/MutesPlugin.ts index 1a205bbea..ddc347ec5 100644 --- a/backend/src/plugins/Mutes/MutesPlugin.ts +++ b/backend/src/plugins/Mutes/MutesPlugin.ts @@ -8,6 +8,7 @@ import { GuildMutes } from "../../data/GuildMutes"; import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; import { CasesPlugin } from "../Cases/CasesPlugin"; import { LogsPlugin } from "../Logs/LogsPlugin"; +import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin.js"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { ClearBannedMutesCmd } from "./commands/ClearBannedMutesCmd"; import { ClearMutesCmd } from "./commands/ClearMutesCmd"; @@ -68,7 +69,7 @@ export const MutesPlugin = zeppelinGuildPlugin()({ configSchema: ConfigSchema, }, - dependencies: () => [CasesPlugin, LogsPlugin], + dependencies: () => [CasesPlugin, LogsPlugin, RoleManagerPlugin], configParser: makeIoTsConfigParser(ConfigSchema), defaultOptions,