Merge pull request #1414 from tyiu/nip52-rsvp-e-and-p-tags

Amend NIP-52 to include e and p tags to calendar event RSVPs
This commit is contained in:
hodlbod 2024-08-12 08:40:57 -07:00 committed by GitHub
commit f8e108e61d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

12
52.md
View File

@ -187,6 +187,10 @@ This NIP is intentionally not defining who is authorized to attend a calendar ev
This NIP is also intentionally not defining what happens if a calendar event changes after an RSVP is submitted. This NIP is also intentionally not defining what happens if a calendar event changes after an RSVP is submitted.
The RSVP MUST have an `a` tag of the event coordinates to the calendar event, and optionally an `e` tag of the id of the specific calendar event revision. If an `e` tag is present, clients SHOULD interpret it as an indication that the RSVP is a response to that revision of the calendar event, and MAY interpret it to not necessarily apply to other revisions of the calendar event.
The RSVP MAY tag the author of the calendar event it is in response to using a `p` tag so that clients can easily query all RSVPs that pertain to the author.
### Format ### Format
The format uses a parameterized replaceable event kind `31925`. The format uses a parameterized replaceable event kind `31925`.
@ -194,10 +198,12 @@ The format uses a parameterized replaceable event kind `31925`.
The `.content` of these events is optional and should be a free-form note that adds more context to this calendar event response. The `.content` of these events is optional and should be a free-form note that adds more context to this calendar event response.
The list of tags are as follows: The list of tags are as follows:
* `a` (required) reference tag to kind `31922` or `31923` calendar event being responded to. * `a` (required) coordinates to a kind `31922` or `31923` calendar event being responded to.
* `e` (optional) event id of a kind `31922` or `31923` calendar event being responded to.
* `d` (required) universally unique identifier. Generated by the client creating the calendar event RSVP. * `d` (required) universally unique identifier. Generated by the client creating the calendar event RSVP.
* `status` (required) `accepted`, `declined`, or `tentative`. Determines attendance status to the referenced calendar event. * `status` (required) `accepted`, `declined`, or `tentative`. Determines attendance status to the referenced calendar event.
* `fb` (optional) `free` or `busy`. Determines if the user would be free or busy for the duration of the calendar event. This tag must be omitted or ignored if the `status` label is set to `declined`. * `fb` (optional) `free` or `busy`. Determines if the user would be free or busy for the duration of the calendar event. This tag must be omitted or ignored if the `status` label is set to `declined`.
* `p` (optional) pubkey of the author of the calendar event being responded to.
```json ```json
{ {
@ -207,10 +213,12 @@ The list of tags are as follows:
"kind": 31925, "kind": 31925,
"content": "<note>", "content": "<note>",
"tags": [ "tags": [
["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional relay url>"], ["e", "<kind 31922 or 31923 event id", "<optional recommended relay URL>"]
["a", "<31922 or 31923>:<calendar event author pubkey>:<d-identifier of calendar event>", "<optional recommended relay URL>"],
["d", "<UUID>"], ["d", "<UUID>"],
["status", "<accepted/declined/tentative>"], ["status", "<accepted/declined/tentative>"],
["fb", "<free/busy>"], ["fb", "<free/busy>"],
["p", "<hex pubkey of kind 31922 or 31923 event>", "<optional recommended relay URL>"]
] ]
} }
``` ```