Skip to content

Commit

Permalink
Add missing dependency to mutes plugin & fix timeout expiry (#430)
Browse files Browse the repository at this point in the history
* +debug

Signed-off-by: GitHub <[email protected]>

* Revert "+debug"

This reverts commit 83daee0.

* add missing dependency to mutes

Signed-off-by: GitHub <[email protected]>

* lower max timeout duration

Signed-off-by: GitHub <[email protected]>

---------

Signed-off-by: GitHub <[email protected]>
  • Loading branch information
metal0 authored Dec 27, 2023
1 parent 00fb71f commit d162418
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/src/data/Mutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion backend/src/plugins/Mutes/MutesPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -68,7 +69,7 @@ export const MutesPlugin = zeppelinGuildPlugin<MutesPluginType>()({
configSchema: ConfigSchema,
},

dependencies: () => [CasesPlugin, LogsPlugin],
dependencies: () => [CasesPlugin, LogsPlugin, RoleManagerPlugin],
configParser: makeIoTsConfigParser(ConfigSchema),
defaultOptions,

Expand Down

0 comments on commit d162418

Please sign in to comment.