Fix hide_case being required

This commit is contained in:
Dragory 2021-05-03 19:40:59 +03:00
parent 9bae5eaea7
commit ddaf3c98ee
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
4 changed files with 8 additions and 8 deletions

View file

@ -22,7 +22,7 @@ export const BanAction = automodAction({
notifyChannel: tNullable(t.string),
deleteMessageDays: tNullable(t.number),
postInCaseLog: tNullable(t.boolean),
hide_case: t.boolean,
hide_case: tNullable(t.boolean),
}),
defaultConfig: {
@ -41,7 +41,7 @@ export const BanAction = automodAction({
extraNotes: matchResult.fullSummary ? [matchResult.fullSummary] : [],
automatic: true,
postInCaseLogOverride: actionConfig.postInCaseLog ?? undefined,
hide: actionConfig.hide_case,
hide: Boolean(actionConfig.hide_case),
};
const userIdsToBan = unique(contexts.map(c => c.user?.id).filter(nonNullish));