diff options
| author | Pablo Fernandez <p@f7z.io> | 2023-11-23 17:52:48 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-23 17:52:48 +0200 |
| commit | 60256a62675a165c4d4fd9811a19a9cbf6a9e7fd (patch) | |
| tree | 5c450154d373caafc37f324dd01e20338308c9d6 /40.md | |
| parent | 43d50ee42409252a1313928cd437d55fd7bf7bf4 (diff) | |
| parent | 7822a8b12670312aff104ddc03066425882f739d (diff) | |
Merge branch 'master' into nip88
Diffstat (limited to '40.md')
| -rw-r--r-- | 40.md | 26 |
1 files changed, 13 insertions, 13 deletions
| @@ -2,9 +2,9 @@ NIP-40 | |||
| 2 | ====== | 2 | ====== |
| 3 | 3 | ||
| 4 | Expiration Timestamp | 4 | Expiration Timestamp |
| 5 | ----------------------------------- | 5 | -------------------- |
| 6 | 6 | ||
| 7 | `draft` `optional` `author:0xtlt` | 7 | `draft` `optional` |
| 8 | 8 | ||
| 9 | The `expiration` tag enables users to specify a unix timestamp at which the message SHOULD be considered expired (by relays and clients) and SHOULD be deleted by relays. | 9 | The `expiration` tag enables users to specify a unix timestamp at which the message SHOULD be considered expired (by relays and clients) and SHOULD be deleted by relays. |
| 10 | 10 | ||
| @@ -20,14 +20,14 @@ values: | |||
| 20 | 20 | ||
| 21 | ```json | 21 | ```json |
| 22 | { | 22 | { |
| 23 | "pubkey": "<pub-key>", | 23 | "pubkey": "<pub-key>", |
| 24 | "created_at": 1000000000, | 24 | "created_at": 1000000000, |
| 25 | "kind": 1, | 25 | "kind": 1, |
| 26 | "tags": [ | 26 | "tags": [ |
| 27 | ["expiration", "1600000000"] | 27 | ["expiration", "1600000000"] |
| 28 | ], | 28 | ], |
| 29 | "content": "This message will expire at the specified timestamp and be deleted by relays.\n", | 29 | "content": "This message will expire at the specified timestamp and be deleted by relays.\n", |
| 30 | "id": "<event-id>" | 30 | "id": "<event-id>" |
| 31 | } | 31 | } |
| 32 | ``` | 32 | ``` |
| 33 | 33 | ||
| @@ -43,9 +43,9 @@ Clients SHOULD ignore events that have expired. | |||
| 43 | Relay Behavior | 43 | Relay Behavior |
| 44 | -------------- | 44 | -------------- |
| 45 | 45 | ||
| 46 | Relays MAY NOT delete expired messages immediately on expiration and MAY persist them indefinitely. | 46 | Relays MAY NOT delete expired messages immediately on expiration and MAY persist them indefinitely. |
| 47 | Relays SHOULD NOT send expired events to clients, even if they are stored. | 47 | Relays SHOULD NOT send expired events to clients, even if they are stored. |
| 48 | Relays SHOULD drop any events that are published to them if they are expired. | 48 | Relays SHOULD drop any events that are published to them if they are expired. |
| 49 | An expiration timestamp does not affect storage of ephemeral events. | 49 | An expiration timestamp does not affect storage of ephemeral events. |
| 50 | 50 | ||
| 51 | Suggested Use Cases | 51 | Suggested Use Cases |