diff options
| author | Josua Schmid <josua.schmid@renuo.ch> | 2023-12-22 14:54:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-22 14:54:17 +0100 |
| commit | d30f03316f0b3ab56faba94b0abfcb9041b81764 (patch) | |
| tree | 7c31d033fbcc5b02673c87f87a52bb5d0dacdefd | |
| parent | 5ed4232584f3ab34192291daf985742248fb14ea (diff) | |
Emphasis on multiple filters in NIP-01
As mentioned further down in NIP-01
> A REQ message may contain multiple filters.
The comma makes it more clear that the message array can container more than 3 items. So it is understood easily to match
```
// correct:
["REQ", <subscription_id>, filters1, filters2, …]
```
instead of
```
// wrong:
["REQ", <subscription_id>, [filters1, filters2, …]]
```
| -rw-r--r-- | 01.md | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -101,7 +101,7 @@ Relays expose a websocket endpoint to which clients can connect. Clients SHOULD | |||
| 101 | Clients can send 3 types of messages, which must be JSON arrays, according to the following patterns: | 101 | Clients can send 3 types of messages, which must be JSON arrays, according to the following patterns: |
| 102 | 102 | ||
| 103 | * `["EVENT", <event JSON as defined above>]`, used to publish events. | 103 | * `["EVENT", <event JSON as defined above>]`, used to publish events. |
| 104 | * `["REQ", <subscription_id>, <filters JSON>...]`, used to request events and subscribe to new updates. | 104 | * `["REQ", <subscription_id>, <filters JSON>, ...]`, used to request events and subscribe to new updates. |
| 105 | * `["CLOSE", <subscription_id>]`, used to stop previous subscriptions. | 105 | * `["CLOSE", <subscription_id>]`, used to stop previous subscriptions. |
| 106 | 106 | ||
| 107 | `<subscription_id>` is an arbitrary, non-empty string of max length 64 chars, that should be used to represent a subscription. Relays should manage `<subscription_id>`s independently for each WebSocket connection; even if `<subscription_id>`s are the same string, they should be treated as different subscriptions for different connections. | 107 | `<subscription_id>` is an arbitrary, non-empty string of max length 64 chars, that should be used to represent a subscription. Relays should manage `<subscription_id>`s independently for each WebSocket connection; even if `<subscription_id>`s are the same string, they should be treated as different subscriptions for different connections. |