From 83daee09d9e63ad0c162f4ec30d42b03ab4bdc7f Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 11:11:26 +0000 Subject: [PATCH 1/4] +debug Signed-off-by: GitHub --- backend/src/plugins/Mutes/functions/muteUser.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/plugins/Mutes/functions/muteUser.ts b/backend/src/plugins/Mutes/functions/muteUser.ts index fc864ada8..df8f54627 100644 --- a/backend/src/plugins/Mutes/functions/muteUser.ts +++ b/backend/src/plugins/Mutes/functions/muteUser.ts @@ -44,6 +44,7 @@ export async function muteUser( const muteType = getDefaultMuteType(pluginData); const muteExpiresAt = muteTime ? Date.now() + muteTime : null; const timeoutUntil = getTimeoutExpiryTime(muteExpiresAt); + console.log("timeoutUntil", timeoutUntil, muteTime); // No mod specified -> mark Zeppelin as the mod if (!muteOptions.caseArgs?.modId) { From e36910b6b962c94135590c5faa88cb200430648c Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 11:24:30 +0000 Subject: [PATCH 2/4] Revert "+debug" This reverts commit 83daee09d9e63ad0c162f4ec30d42b03ab4bdc7f. --- backend/src/plugins/Mutes/functions/muteUser.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/src/plugins/Mutes/functions/muteUser.ts b/backend/src/plugins/Mutes/functions/muteUser.ts index df8f54627..fc864ada8 100644 --- a/backend/src/plugins/Mutes/functions/muteUser.ts +++ b/backend/src/plugins/Mutes/functions/muteUser.ts @@ -44,7 +44,6 @@ export async function muteUser( const muteType = getDefaultMuteType(pluginData); const muteExpiresAt = muteTime ? Date.now() + muteTime : null; const timeoutUntil = getTimeoutExpiryTime(muteExpiresAt); - console.log("timeoutUntil", timeoutUntil, muteTime); // No mod specified -> mark Zeppelin as the mod if (!muteOptions.caseArgs?.modId) { From 7879bb579892e52b25e07cfba8dbdb69e7c7a554 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 11:27:04 +0000 Subject: [PATCH 3/4] add missing dependency to mutes Signed-off-by: GitHub --- backend/src/plugins/Mutes/MutesPlugin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, From 377692f6bb5bde06d6af5159ceae4852a762bb35 Mon Sep 17 00:00:00 2001 From: Tiago R Date: Sun, 26 Nov 2023 11:36:43 +0000 Subject: [PATCH 4/4] lower max timeout duration Signed-off-by: GitHub --- backend/src/data/Mutes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;