diff --git a/server/src/core/server/services/comments/pipeline/phases/external.ts b/server/src/core/server/services/comments/pipeline/phases/external.ts index c0315cac30..1aaa64faea 100644 --- a/server/src/core/server/services/comments/pipeline/phases/external.ts +++ b/server/src/core/server/services/comments/pipeline/phases/external.ts @@ -102,7 +102,6 @@ export interface ExternalModerationRequest { tenantDomain: string; } -// BOOKMARK: (marcushaddon) do we need a new type to maintain type safety with joi? export type ExternalModerationResponse = Partial< Pick > & { actions: PhaseResult["commentActions"] }; diff --git a/server/src/core/server/services/comments/pipeline/phases/wordList/phase.ts b/server/src/core/server/services/comments/pipeline/phases/wordList/phase.ts index 0bb102380e..358606d939 100644 --- a/server/src/core/server/services/comments/pipeline/phases/wordList/phase.ts +++ b/server/src/core/server/services/comments/pipeline/phases/wordList/phase.ts @@ -31,6 +31,12 @@ export const wordListPhase: IntermediateModerationPhase = async ({ if (banned.isMatched) { return { status: GQLCOMMENT_STATUS.REJECTED, + commentActions: [ + { + actionType: ACTION_TYPE.FLAG, + reason: GQLCOMMENT_FLAG_REASON.COMMENT_DETECTED_BANNED_WORD, + }, + ], moderationAction: { status: GQLCOMMENT_STATUS.REJECTED, moderatorID: null,