Skip to content

fix(reports): align e/p tag report types with NIP-56 standard values #280

@mbradley

Description

@mbradley

Problem

divine-web's useReportContent() hook puts app-level reason strings directly in the e/p tag 3rd element (e.g., csam, sexual-content, harassment). NIP-56 requires one of 7 standard types: nudity, malware, profanity, illegal, spam, impersonation, other.

divine-web already emits NIP-32 l/L tags correctly (['L', 'social.nos.ontology'] + ['l', 'NS-csam', 'social.nos.ontology']), so the app-level reason is already preserved in a structured, queryable tag. The only change needed is mapping the e/p tag 3rd element to NIP-56 standard types.

Current (non-compliant)

["e", "<eventId>", "csam"]

Expected (NIP-56 compliant)

["e", "<eventId>", "illegal"]

The l/L tags already carry the app-level reason, so no information is lost.

Mapping needed

Same as divine-mobile's _toNip56ReportType():

App reason NIP-56 type
csam illegal
violence illegal
copyright illegal
harassment profanity
sexual-content nudity
false-info other
ai-generated other
spam spam
impersonation impersonation
illegal illegal
other other

Related

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions