upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2024-12-13 00:04:37 -0300
committerfiatjaf <fiatjaf@gmail.com>2025-03-18 13:04:41 -0300
commit0b3eea1053de1e5f2043d89912f10afc2328378c (patch)
tree5cb8bbe0f476d654e8cabcfa721b7558cd5934a6
parent0619f370bca3485bb9c5870bc2defa03c7c3d10e (diff)
nip01: remove useless filter batching.
-rw-r--r--01.md4
1 files changed, 1 insertions, 3 deletions
diff --git a/01.md b/01.md
index f7f592c..5ba6282 100644
--- a/01.md
+++ b/01.md
@@ -113,7 +113,7 @@ Relays expose a websocket endpoint to which clients can connect. Clients SHOULD
113Clients can send 3 types of messages, which must be JSON arrays, according to the following patterns: 113Clients can send 3 types of messages, which must be JSON arrays, according to the following patterns:
114 114
115 * `["EVENT", <event JSON as defined above>]`, used to publish events. 115 * `["EVENT", <event JSON as defined above>]`, used to publish events.
116 * `["REQ", <subscription_id>, <filters1>, <filters2>, ...]`, used to request events and subscribe to new updates. 116 * `["REQ", <subscription_id>, <filter>]`, used to request events and subscribe to new updates.
117 * `["CLOSE", <subscription_id>]`, used to stop previous subscriptions. 117 * `["CLOSE", <subscription_id>]`, used to stop previous subscriptions.
118 118
119`<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 guaranteed to be globally unique. 119`<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 guaranteed to be globally unique.
@@ -142,8 +142,6 @@ The `since` and `until` properties can be used to specify the time range of even
142 142
143All conditions of a filter that are specified must match for an event for it to pass the filter, i.e., multiple conditions are interpreted as `&&` conditions. 143All conditions of a filter that are specified must match for an event for it to pass the filter, i.e., multiple conditions are interpreted as `&&` conditions.
144 144
145A `REQ` message may contain multiple filters. In this case, events that match any of the filters are to be returned, i.e., multiple filters are to be interpreted as `||` conditions.
146
147The `limit` property of a filter is only valid for the initial query and MUST be ignored afterwards. When `limit: n` is present it is assumed that the events returned in the initial query will be the last `n` events ordered by the `created_at`. Newer events should appear first, and in the case of ties the event with the lowest id (first in lexical order) should be first. It is safe to return less events than `limit` specifies, but it is expected that relays do not return (much) more events than requested so clients don't get unnecessarily overwhelmed by data. 145The `limit` property of a filter is only valid for the initial query and MUST be ignored afterwards. When `limit: n` is present it is assumed that the events returned in the initial query will be the last `n` events ordered by the `created_at`. Newer events should appear first, and in the case of ties the event with the lowest id (first in lexical order) should be first. It is safe to return less events than `limit` specifies, but it is expected that relays do not return (much) more events than requested so clients don't get unnecessarily overwhelmed by data.
148 146
149### From relay to client: sending events and notices 147### From relay to client: sending events and notices