reports module lets a user report an entity or comment, and lets moderators read the queue of reports they’re responsible for.
Both functions act on behalf of a named user. Pass that user’s Sublay ID as
userId — for createReport this is the reporter; for fetchModeratedReports
it is the moderator whose queue is returned.createReport
Files a report against an entity or comment on behalf of a user. If the same user has already reported the same target, the existing report is updated rather than duplicated.The Sublay user ID filing the report (the reporter).
What is being reported:
"entity" or "comment".The Sublay ID of the entity or comment being reported.
The reason for the report.
Optional free-text details about the report.
Promise<CreateReportResponse>
fetchModeratedReports
Returns a paginated list of reports in the spaces the user moderates. Each report is aggregated across all users who reported the same target, and is populated with the target content and space.The Sublay user ID of the moderator whose queue to fetch.
Filter to reports within a specific space.
Filter by target type:
"entity" or "comment".Filter by report status:
"pending", "on-hold", "escalated", "dismissed", or "actioned".Sort order:
"new" (most recent first) or "old" (oldest first).Page number (1-indexed). Defaults to
1.Results per page. Defaults to
20.Promise<PaginatedResponse<Report>>
To act on a report (remove content, ban the author, or dismiss it), use
handleEntityReport / handleCommentReport on the
Space Moderation module.
