Add missing dependency to mutes plugin & fix timeout expiry (#430)

* +debug

Signed-off-by: GitHub <noreply@github.com>

* Revert "+debug"

This reverts commit 83daee09d9e63ad0c162f4ec30d42b03ab4bdc7f.

* add missing dependency to mutes

Signed-off-by: GitHub <noreply@github.com>

* lower max timeout duration

Signed-off-by: GitHub <noreply@github.com>

---------

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Tiago R 2023-12-27 18:38:26 +00:00 committed by GitHub
parent 00fb71f26d
commit d162418be5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -8,7 +8,7 @@ import { Mute } from "./entities/Mute";
const OLD_EXPIRED_MUTE_THRESHOLD = 7 * DAYS; 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 // 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; export const TIMEOUT_RENEWAL_THRESHOLD = 21 * DAYS;

View file

@ -8,6 +8,7 @@ import { GuildMutes } from "../../data/GuildMutes";
import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils"; import { makeIoTsConfigParser, mapToPublicFn } from "../../pluginUtils";
import { CasesPlugin } from "../Cases/CasesPlugin"; import { CasesPlugin } from "../Cases/CasesPlugin";
import { LogsPlugin } from "../Logs/LogsPlugin"; import { LogsPlugin } from "../Logs/LogsPlugin";
import { RoleManagerPlugin } from "../RoleManager/RoleManagerPlugin.js";
import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint"; import { zeppelinGuildPlugin } from "../ZeppelinPluginBlueprint";
import { ClearBannedMutesCmd } from "./commands/ClearBannedMutesCmd"; import { ClearBannedMutesCmd } from "./commands/ClearBannedMutesCmd";
import { ClearMutesCmd } from "./commands/ClearMutesCmd"; import { ClearMutesCmd } from "./commands/ClearMutesCmd";
@ -68,7 +69,7 @@ export const MutesPlugin = zeppelinGuildPlugin<MutesPluginType>()({
configSchema: ConfigSchema, configSchema: ConfigSchema,
}, },
dependencies: () => [CasesPlugin, LogsPlugin], dependencies: () => [CasesPlugin, LogsPlugin, RoleManagerPlugin],
configParser: makeIoTsConfigParser(ConfigSchema), configParser: makeIoTsConfigParser(ConfigSchema),
defaultOptions, defaultOptions,