From b503f8a92b22be3037b8115fe3e644865a4fa155 Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Wed, 19 Jul 2023 12:34:07 +0900 Subject: [PATCH] Clarify sort order when specified limit --- 01.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01.md b/01.md index 01cfcc1a..f607ca20 100644 --- a/01.md +++ b/01.md @@ -84,7 +84,7 @@ All conditions of a filter that are specified must match for an event for it to A `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. -The `limit` property of a filter is only valid for the initial query and can be ignored afterward. When `limit: n` is present it is assumed that the events returned in the initial query will be the latest `n` events. 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. +The `limit` property of a filter is only valid for the initial query and can be ignored afterward. 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`. 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. ### From relay to client: sending events and notices