From dea4bebf4b1bf36feeb8a066bccf62b9b1aeb5c5 Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Tue, 6 Aug 2024 23:55:47 -0400 Subject: [PATCH 1/3] Amend NIP-52 to include e and p tags to calendar event RSVPs --- 52.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/52.md b/52.md index f35d9040..077c8472 100644 --- a/52.md +++ b/52.md @@ -178,6 +178,12 @@ 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. +The RSVP MUST tag the calendar event it is in response to with an `e` tag on the calendar event's id. + +The RSVP MAY tag use an `a` tag to the calendar event's event coordinates to indicate that the RSVP response could hold trueregardless of any future revisions to the calendar event. If the `a` tag is omitted, the author of the RSVP is explicitly indicating that its response holds true for only that specific revision of the calendar event from the `e` tag. + +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 The format uses a parameterized replaceable event kind `31925`. @@ -185,10 +191,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 list of tags are as follows: -* `a` (required) reference tag to kind `31922` or `31923` calendar event being responded to. +* `e` (required) event tag to kind `31922` or `31923` calendar event being responded to. +* `a` (optional) reference tag to kind `31922` or `31923` calendar event being responded to. * `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. * `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) author of the calendar event being responded to. ```json { @@ -198,10 +206,12 @@ The list of tags are as follows: "kind": 31925, "content": "", "tags": [ - ["a", "<31922 or 31923>::", ""], + ["e", ""] + ["a", "<31922 or 31923>::", ""], ["d", ""], ["status", ""], ["fb", ""], + ["p", "", ""] ] } ``` From d36b24c82a07ad9769d5ff9aa2e01cfa65ca0614 Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Thu, 8 Aug 2024 01:04:25 -0400 Subject: [PATCH 2/3] Revise NIP-52 amendments so that they are backwards compatible --- 52.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/52.md b/52.md index fb857374..2b2f6db6 100644 --- a/52.md +++ b/52.md @@ -187,9 +187,11 @@ 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. -The RSVP MUST tag the calendar event it is in response to with an `e` tag on the calendar event's id. +The RSVP MUST have at least one of an `a` tag of the event coordinates to the calendar event, or `e` tag of the id of the specific calendar event revision. -The RSVP MAY tag use an `a` tag to the calendar event's event coordinates to indicate that the RSVP response could hold trueregardless of any future revisions to the calendar event. If the `a` tag is omitted, the author of the RSVP is explicitly indicating that its response holds true for only that specific revision of the calendar event from the `e` tag. +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. + +If an `a` tag is present, clients SHOULD interpret it as an indication that the RSVP may hold true for all 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. @@ -200,12 +202,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 list of tags are as follows: -* `e` (required) event tag to kind `31922` or `31923` calendar event being responded to. -* `a` (optional) reference tag to kind `31922` or `31923` calendar event being responded to. +* `e` (optional) event id of a kind `31922` or `31923` calendar event being responded to. This tag is required if `a` is omitted. +* `a` (optional) coordinates to a kind `31922` or `31923` calendar event being responded to. This tag is required if `e` is omitted. * `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. * `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) author of the calendar event being responded to. +* `p` (optional) pubkey of the author of the calendar event being responded to. ```json { From ec1f0fcadaa7b62cc17633cc5a86686e85ebe7a6 Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Sun, 11 Aug 2024 15:50:39 -0400 Subject: [PATCH 3/3] Update NIP-52 change to not be backwards incompatible by restoring required 'a' tag and clarify how clients should or may interpret the optional 'e' tag --- 52.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/52.md b/52.md index 2b2f6db6..bedf613c 100644 --- a/52.md +++ b/52.md @@ -187,11 +187,7 @@ 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. -The RSVP MUST have at least one of an `a` tag of the event coordinates to the calendar event, or `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. - -If an `a` tag is present, clients SHOULD interpret it as an indication that the RSVP may hold true for all revisions of the calendar event. +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. @@ -202,8 +198,8 @@ 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 list of tags are as follows: -* `e` (optional) event id of a kind `31922` or `31923` calendar event being responded to. This tag is required if `a` is omitted. -* `a` (optional) coordinates to a kind `31922` or `31923` calendar event being responded to. This tag is required if `e` is omitted. +* `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. * `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`.