diff options
| author | Josua Schmid <josua.schmid@renuo.ch> | 2023-12-26 21:57:04 +0100 |
|---|---|---|
| committer | fiatjaf_ <fiatjaf@gmail.com> | 2023-12-26 20:02:34 -0300 |
| commit | 8e5a275f991c8fe31aba9db0ea0dac2586d50ca3 (patch) | |
| tree | cf00e1281dbcb235400d09a6938d16a8cf25dbd5 | |
| parent | 92f3a45bdc67c2e321788a15301a2c09f50cd2e9 (diff) | |
NIP-01 Tighten-up subscription_id management rule
Rephrase to "MUST" so that one does not assume a connection could `CLOSE` any `subscription_id`, which it must not.
| -rw-r--r-- | 01.md | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -104,7 +104,7 @@ Clients can send 3 types of messages, which must be JSON arrays, according to th | |||
| 104 | * `["REQ", <subscription_id>, <filters1>, <filters2>, ...]`, used to request events and subscribe to new updates. | 104 | * `["REQ", <subscription_id>, <filters1>, <filters2>, ...]`, 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. It represents a subscription per connection. Relays MUST manage `<subscription_id>`s independently for each WebSocket connection. `<subscription_id>`s are not guarantueed to be globally unique. |
| 108 | 108 | ||
| 109 | `<filtersX>` is a JSON object that determines what events will be sent in that subscription, it can have the following attributes: | 109 | `<filtersX>` is a JSON object that determines what events will be sent in that subscription, it can have the following attributes: |
| 110 | 110 | ||