Advise for created_at after conditions to be provided regardless of

whether a before condition is also present
This commit is contained in:
Ben Hayward 2023-01-29 00:37:54 +00:00
parent 048174da90
commit 5898903972
No known key found for this signature in database
GPG Key ID: FB238AA1205F3DBE

16
26.md
View File

@ -52,7 +52,7 @@ For example, the following condition strings are valid:
- `kind=0&kind=1&created_at>1675721813`
- `kind=1&created_at>1674777689&created_at<1675721813`
It is advisable when constructing a delegation token query string with a `created_at` ***before*** operator, that a `created_at` ***after*** operator is also provided to precisely scope the time window that the delegation token is valid for. This prevents the delegatee from publishing historic notes on the delegator's behalf.
For the vast majority of use-cases, it is advisable that query strings should include a `created_at` ***after*** condition to prevent delegatee's from publishing historic notes on delegator's behalves.
#### Example
@ -104,3 +104,17 @@ Clients should display the delegated note as if it was published directly by the
#### Relay & Client Querying Support
Relays should answer requests such as `["REQ", "", {"authors": ["A"]}]` by querying both the `pubkey` and delegation tags `[1]` value.
[
0,
"477318cfb5427b9cfc66a9fa376150c1ddbc62115ae27cef72417eb959691396",
1677426298,
1,
[
"delegation",
"8e0d3d3eb2881ec137a11debe736a9086715a8c8beeeda615780064d68bc25dd",
"kind=1&created_at>1674834236&created_at<1677426236",
"6f44d7fe4f1c09f3954640fb58bd12bae8bb8ff4120853c4693106c82e920e2b898f1f9ba9bd65449a987c39c0423426ab7b53910c0c6abfb41b30bc16e5f524"
],
Hello, world!
]