Add hide_case option to automod mod actions
This commit is contained in:
parent
31d7748bf4
commit
25a3350196
6 changed files with 14 additions and 0 deletions
|
@ -12,10 +12,12 @@ export const WarnAction = automodAction({
|
|||
notify: tNullable(t.string),
|
||||
notifyChannel: tNullable(t.string),
|
||||
postInCaseLog: tNullable(t.boolean),
|
||||
hide_case: t.boolean,
|
||||
}),
|
||||
|
||||
defaultConfig: {
|
||||
notify: null, // Use defaults from ModActions
|
||||
hide_case: false,
|
||||
},
|
||||
|
||||
async apply({ pluginData, contexts, actionConfig, matchResult }) {
|
||||
|
@ -27,6 +29,7 @@ export const WarnAction = automodAction({
|
|||
extraNotes: matchResult.fullSummary ? [matchResult.fullSummary] : [],
|
||||
automatic: true,
|
||||
postInCaseLogOverride: actionConfig.postInCaseLog ?? undefined,
|
||||
hide: actionConfig.hide_case,
|
||||
};
|
||||
|
||||
const userIdsToWarn = unique(contexts.map(c => c.user?.id).filter(nonNullish));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue