upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerry Yiu <963907+tyiu@users.noreply.github.com>2023-12-03 10:29:59 +0000
committerTerry Yiu <963907+tyiu@users.noreply.github.com>2023-12-08 09:39:28 -0800
commitb8308a9a040005c7a06369d6f71a6f2db6ee9c92 (patch)
tree7d5770a1fdcfd7b43e0820f35124b1c780cce5b5
parentef106ecccad2f764f80cae85f2bc666a419f9e20 (diff)
Amend NIP-52 to require the content field to be provided, and decouple calendar identifier from calendar name
-rw-r--r--52.md20
1 files changed, 14 insertions, 6 deletions
diff --git a/52.md b/52.md
index 15cc8fc..71b1df2 100644
--- a/52.md
+++ b/52.md
@@ -22,14 +22,14 @@ This kind of calendar event starts on a date and ends before a different date in
22 22
23The format uses a parameterized replaceable event kind `31922`. 23The format uses a parameterized replaceable event kind `31922`.
24 24
25The `.content` of these events is optional and should be a detailed description of the calendar event. 25The `.content` of these events should be a detailed description of the calendar event. It is required but can be an empty string.
26 26
27The list of tags are as follows: 27The list of tags are as follows:
28* `d` (required) universally unique identifier (UUID). Generated by the client creating the calendar event. 28* `d` (required) universally unique identifier (UUID). Generated by the client creating the calendar event.
29* `name` (required) name of the calendar event 29* `name` (required) name of the calendar event
30* `start` (required) inclusive start date in ISO 8601 format (YYYY-MM-DD). Must be less than `end`, if it exists. 30* `start` (required) inclusive start date in ISO 8601 format (YYYY-MM-DD). Must be less than `end`, if it exists.
31* `end` (optional) exclusive end date in ISO 8601 format (YYYY-MM-DD). If omitted, the calendar event ends on the same date as `start`. 31* `end` (optional) exclusive end date in ISO 8601 format (YYYY-MM-DD). If omitted, the calendar event ends on the same date as `start`.
32* `location` (optional) location of the calendar event. e.g. address, GPS coordinates, meeting room name, link to video call 32* `location` (optional, repeated) location of the calendar event. e.g. address, GPS coordinates, meeting room name, link to video call
33* `g` (optional) [geohash](https://en.wikipedia.org/wiki/Geohash) to associate calendar event with a searchable physical location 33* `g` (optional) [geohash](https://en.wikipedia.org/wiki/Geohash) to associate calendar event with a searchable physical location
34* `p` (optional, repeated) 32-bytes hex pubkey of a participant, optional recommended relay URL, and participant's role in the meeting 34* `p` (optional, repeated) 32-bytes hex pubkey of a participant, optional recommended relay URL, and participant's role in the meeting
35* `t` (optional, repeated) hashtag to categorize calendar event 35* `t` (optional, repeated) hashtag to categorize calendar event
@@ -78,7 +78,7 @@ This kind of calendar event spans between a start time and end time.
78 78
79The format uses a parameterized replaceable event kind `31923`. 79The format uses a parameterized replaceable event kind `31923`.
80 80
81The `.content` of these events is optional and should be a detailed description of the calendar event. 81The `.content` of these events should be a detailed description of the calendar event. It is required but can be an empty string.
82 82
83The list of tags are as follows: 83The list of tags are as follows:
84* `d` (required) universally unique identifier (UUID). Generated by the client creating the calendar event. 84* `d` (required) universally unique identifier (UUID). Generated by the client creating the calendar event.
@@ -87,7 +87,7 @@ The list of tags are as follows:
87* `end` (optional) exclusive end Unix timestamp in seconds. If omitted, the calendar event ends instantaneously. 87* `end` (optional) exclusive end Unix timestamp in seconds. If omitted, the calendar event ends instantaneously.
88* `start_tzid` (optional) time zone of the start timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica` 88* `start_tzid` (optional) time zone of the start timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica`
89* `end_tzid` (optional) time zone of the end timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica`. If omitted and `start_tzid` is provided, the time zone of the end timestamp is the same as the start timestamp. 89* `end_tzid` (optional) time zone of the end timestamp, as defined by the IANA Time Zone Database. e.g., `America/Costa_Rica`. If omitted and `start_tzid` is provided, the time zone of the end timestamp is the same as the start timestamp.
90* `location` (optional) location of the calendar event. e.g. address, GPS coordinates, meeting room name, link to video call 90* `location` (optional, repeated) location of the calendar event. e.g. address, GPS coordinates, meeting room name, link to video call
91* `g` (optional) [geohash](https://en.wikipedia.org/wiki/Geohash) to associate calendar event with a searchable physical location 91* `g` (optional) [geohash](https://en.wikipedia.org/wiki/Geohash) to associate calendar event with a searchable physical location
92* `p` (optional, repeated) 32-bytes hex pubkey of a participant, optional recommended relay URL, and participant's role in the meeting 92* `p` (optional, repeated) 32-bytes hex pubkey of a participant, optional recommended relay URL, and participant's role in the meeting
93* `t` (optional, repeated) hashtag to categorize calendar event 93* `t` (optional, repeated) hashtag to categorize calendar event
@@ -137,15 +137,23 @@ A calendar is a collection of calendar events, represented as a custom replaceab
137 137
138### Format 138### Format
139 139
140The `.content` of these events should be a detailed description of the calendar. It is required but can be an empty string.
141
140The format uses a custom replaceable list of kind `31924` with a list of tags as described below: 142The format uses a custom replaceable list of kind `31924` with a list of tags as described below:
141* `d` (required) calendar name 143* `d` (required) universally unique identifier. Generated by the client creating the calendar.
144* `name` (required) calendar name
142* `a` (repeated) reference tag to kind `31922` or `31923` calendar event being responded to 145* `a` (repeated) reference tag to kind `31922` or `31923` calendar event being responded to
143 146
144```json 147```json
145{ 148{
149 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
150 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
151 "created_at": <Unix timestamp in seconds>,
146 "kind": 31924, 152 "kind": 31924,
153 "content": "<description of calendar>",
147 "tags": [ 154 "tags": [
148 ["d", "<calendar name>"], 155 ["d", "<UUID>"],
156 ["name", "<calendar name>"],
149 ["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"], 157 ["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"],
150 ["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"] 158 ["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"]
151 ] 159 ]