Skip to content

Commit

Permalink
Merge pull request #4641 from coralproject/feat/CORL-3174-external-be…
Browse files Browse the repository at this point in the history
…fore-premod

[CORL-3174] Move external mod phases to run before pre-moderation
  • Loading branch information
tessalt committed Aug 6, 2024
2 parents a8a00f7 + 372ef4d commit 25d20b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ export const moderationPhases: IntermediateModerationPhase[] = [
spam,
detectLinks,

// Apply any pre-existing conditions to these comments.
// Run any external moderation phase that missed other filters.
external,

// Apply any pre-moderation conditions to these comments.
statusPreModerateNewCommenter,
statusPreModerate,
statusPreModerateUser,

// Run any external moderation phase that missed other filters.
external,
];
8 changes: 8 additions & 0 deletions utilities/externalModPhase/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ const run = async () => {
res.send(result);
});

app.post("/api/none", (req, res) => {
console.log(req.body);

const result = {};

res.send(result);
});

app.listen(PORT, HOST, () => {
console.log(`external mod phase tester is listening on "${HOST}:${PORT}"...`);
});
Expand Down

0 comments on commit 25d20b9

Please sign in to comment.