Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Reports

The reports table in the Directory Canister stores moderation reports submitted by users. This document defines the validation rules for report columns.

reason

Free-form text supplied by the reporter.

RuleValue
SanitizationTrim leading/trailing whitespace
Maximum length1000 characters
Minimum length1 (empty string rejected)
NullableNo
Length unitUnicode scalar values

Enforced by TrimSanitizer + BoundedTextValidator(1000) in db-utils.

target_status_uri

Optional URI of the specific status being reported. When null, the report targets the user’s account as a whole.

RuleValue
FormatValid URL (per the url crate)
NullableYes

Enforced by NullableUrlValidator in db-utils.

state

Open → submitted, awaiting moderator review. Resolved → moderator took action. Dismissed → moderator reviewed and declined to act.

See ReportState in the database schema reference for the on-disk encoding.

reporter, target_canister, resolved_by

Typed Principal columns. Validated by the candid/type layer; no schema-level validator.

created_at, resolved_at

UINT64 timestamps. created_at is indexed for recent-first listing. resolved_at is null until state transitions out of Open.