fix(#280): align e/p tag report types with nip 56 standard values#287
Conversation
🚀 Preview Deployment
|
mbradley
left a comment
There was a problem hiding this comment.
Clean fix -- mapping is exhaustive, tests cover the full contract, and the NS-* NIP-32 labels are preserved unchanged so relay-manager's report UI won't lose any categorization fidelity.
One minor observation: HARASSMENT to profanity is the best available NIP-56 match, but it's worth noting that this is a lossy mapping by design. The NS-harassment label in the l tag is what carries the actual intent. Relay operators or other clients consuming only the e/p tag will see "profanity" where the user meant "harassment."
Approving -- this is ready to merge.
@mbradley TYSM for your review! I will wait new assignments from you, @jalcine and @NotThatKindOfDrLiz |
|
These changes are already handled now upstream! |
Summary
e/ptag third values with NIP-56 standard report types.L/ltags (social.nos.ontology,NS-*).1984events.Problem
useReportContent()was writing app-level reasons (for examplecsam,sexual-content,harassment) directly into thee/ptag third element.NIP-56 requires these values to be one of:
nudity,malware,profanity,illegal,spam,impersonation,other.What Changed
ContentFilterReasonto NIP-56 report types.useReportContent()to use mapped NIP-56 values in:["e", "<eventId>", "<nip56-type>"]["p", "<pubkey>", "<nip56-type>"]["L", "social.nos.ontology"]["l", "NS-<app-reason>", "social.nos.ontology"]1984e/pRelated
Closes #280