Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CORL-2934]: DSA - Send rejection reason through when illegal content decision made #4393

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions server/src/core/server/services/dsaReports/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { rejectComment } from "coral-server/stacks";
import {
GQLDSAReportDecisionLegality,
GQLDSAReportStatus,
GQLREJECTION_REASON_CODE,
} from "coral-server/graph/schema/__generated__/types";

import { I18n } from "../i18n";
Expand Down Expand Up @@ -182,13 +183,12 @@ export async function makeDSAReportDecision(
input: MakeDSAReportDecisionInput,
now = new Date()
) {
// TODO: Send through rejection legalGrounds and detailedExplanation once backend support is available
const {
commentID,
commentRevisionID,
userID,
// legalGrounds,
// detailedExplanation,
legalGrounds,
detailedExplanation,
} = input;

// REJECT if ILLEGAL
Expand All @@ -205,7 +205,12 @@ export async function makeDSAReportDecision(
commentID,
commentRevisionID,
userID,
now
now,
{
code: GQLREJECTION_REASON_CODE.ILLEGAL_CONTENT,
legalGrounds,
detailedExplanation,
}
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ export class InternalNotificationContext {

const result = translate(bundle, text, key, args);

// eslint-disable-next-line no-console
console.log(result, args);

return result;
}

Expand Down