mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-12-09 00:28:51 +00:00
CLOSED messages for relays that want to reject REQs and NIP-42 AUTH integration (#902)
Co-authored-by: monlovesmango <96307647+monlovesmango@users.noreply.github.com>
This commit is contained in:
11
45.md
11
45.md
@@ -27,7 +27,9 @@ In case a relay uses probabilistic counts, it MAY indicate it in the response wi
|
||||
["COUNT", <subscription_id>, {"count": <integer>}]
|
||||
```
|
||||
|
||||
## Examples:
|
||||
Whenever the relay decides to refuse to fulfill the `COUNT` request, it MUST return a `CLOSED` message.
|
||||
|
||||
## Examples
|
||||
|
||||
### Followers count
|
||||
|
||||
@@ -49,3 +51,10 @@ In case a relay uses probabilistic counts, it MAY indicate it in the response wi
|
||||
["COUNT", <subscription_id>, {"kinds": [1]}]
|
||||
["COUNT", <subscription_id>, {"count": 93412452, "approximate": true}]
|
||||
```
|
||||
|
||||
### Relay refuses to count
|
||||
|
||||
```
|
||||
["COUNT", <subscription_id>, {"kinds": [4], "authors": [<pubkey>], "#p": [<pubkey>]}]
|
||||
["CLOSED", <subscription_id>, "auth-required: cannot count other people's DMs"]
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user