mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-03-29 03:02:07 +01:00
NIP-56: Reporting
This commit is contained in:
parent
3b1cd96798
commit
7b96b8d60c
70
56.md
Normal file
70
56.md
Normal file
@ -0,0 +1,70 @@
|
||||
|
||||
NIP-56
|
||||
======
|
||||
|
||||
Reporting
|
||||
---------
|
||||
|
||||
`draft` `optional` `author:jb55`
|
||||
|
||||
A report is a `kind 1984` note that is used to report other notes for spam,
|
||||
illegal and explicit content.
|
||||
|
||||
The content MAY contain additional information submitted by the entity
|
||||
reporting the content.
|
||||
|
||||
Tags
|
||||
----
|
||||
|
||||
The report event MUST include a `p` tag referencing the pubkey of the user you
|
||||
are reporting.
|
||||
|
||||
If reporting a note, an `e` tag MUST also be included referencing the note id.
|
||||
|
||||
A `report` tag MUST be included which consists of the following report types:
|
||||
|
||||
- `explicit` - explicit content which may not be appropriate for minors: nudity, profanity, etc
|
||||
- `illegal` - something which may be illegal in some jurisdiction
|
||||
- `spam` - spam
|
||||
- `impersonation` - someone pretending to be someone else
|
||||
|
||||
Some report tags only make sense for profile reports, such as `impersonation`
|
||||
|
||||
Example code
|
||||
|
||||
```swift
|
||||
enum ReportType: String {
|
||||
case explicit
|
||||
case illegal
|
||||
case spam
|
||||
case impersonation
|
||||
}
|
||||
|
||||
func create_report_tags(target: ReportTarget, type: ReportType) -> [[String]] {
|
||||
var tags: [[String]]
|
||||
switch target {
|
||||
case .user(let pubkey):
|
||||
tags = [["p", pubkey]]
|
||||
case .note(let notet):
|
||||
tags = [["e", notet.note_id], ["p", notet.pubkey]]
|
||||
}
|
||||
|
||||
tags.append(["report", type.rawValue])
|
||||
return tags
|
||||
}
|
||||
```
|
||||
|
||||
Client behavior
|
||||
---------------
|
||||
|
||||
Clients can use reports from friends to make moderation decisions if they
|
||||
choose to. For instance, if 3+ of your friends report a profile as explicit,
|
||||
clients can have an option to automatically blur photos from said account.
|
||||
|
||||
|
||||
Relay behavior
|
||||
--------------
|
||||
|
||||
It is not recommended that relays perform automatic moderation using reports,
|
||||
as they can be easily gamed. Admins could use reports from trused moderators to
|
||||
takedown illegal or explicit content if the relays does not allow such things.
|
@ -30,6 +30,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh
|
||||
- [NIP-40: Expiration Timestamp](40.md)
|
||||
- [NIP-42: Authentication of clients to relays](42.md)
|
||||
- [NIP-50: Keywords filter](50.md)
|
||||
- [NIP-56: Reporting](56.md)
|
||||
|
||||
## Event Kinds
|
||||
|
||||
@ -48,6 +49,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh
|
||||
| 43 | Channel Hide Message | [28](28.md) |
|
||||
| 44 | Channel Mute User | [28](28.md) |
|
||||
| 45-49 | Public Chat Reserved | [28](28.md) |
|
||||
| 1984 | Reporting | [56](56.md) |
|
||||
| 22242 | Client Authentication | [42](42.md) |
|
||||
| 10000-19999 | Replaceable Events Reserved | [16](16.md) |
|
||||
| 20000-29999 | Ephemeral Events Reserved | [16](16.md) |
|
||||
|
Loading…
x
Reference in New Issue
Block a user