Skip to content

Commit 1a87a22

Browse files
committed
send through rejection reason when decision made on illegal content report
1 parent b18e52c commit 1a87a22

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Diff for: server/src/core/server/services/dsaReports/reports.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { rejectComment } from "coral-server/stacks";
1616
import {
1717
GQLDSAReportDecisionLegality,
1818
GQLDSAReportStatus,
19+
GQLREJECTION_REASON_CODE,
1920
} from "coral-server/graph/schema/__generated__/types";
2021

2122
import { I18n } from "../i18n";
@@ -182,13 +183,12 @@ export async function makeDSAReportDecision(
182183
input: MakeDSAReportDecisionInput,
183184
now = new Date()
184185
) {
185-
// TODO: Send through rejection legalGrounds and detailedExplanation once backend support is available
186186
const {
187187
commentID,
188188
commentRevisionID,
189189
userID,
190-
// legalGrounds,
191-
// detailedExplanation,
190+
legalGrounds,
191+
detailedExplanation,
192192
} = input;
193193

194194
// REJECT if ILLEGAL
@@ -205,7 +205,12 @@ export async function makeDSAReportDecision(
205205
commentID,
206206
commentRevisionID,
207207
userID,
208-
now
208+
now,
209+
{
210+
code: GQLREJECTION_REASON_CODE.ILLEGAL_CONTENT,
211+
legalGrounds,
212+
detailedExplanation,
213+
}
209214
);
210215
}
211216

Diff for: server/src/core/server/services/notifications/internal/context.ts

-3
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ export class InternalNotificationContext {
151151

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

154-
// eslint-disable-next-line no-console
155-
console.log(result, args);
156-
157154
return result;
158155
}
159156

0 commit comments

Comments
 (0)