Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a JMAP method: CalendarEventAttendance/get #1328

Closed
chibenwa opened this issue Nov 22, 2024 · 2 comments · Fixed by #1447
Closed

Provide a JMAP method: CalendarEventAttendance/get #1328

chibenwa opened this issue Nov 22, 2024 · 2 comments · Fixed by #1447
Assignees

Comments

@chibenwa
Copy link
Member

chibenwa commented Nov 22, 2024

Why?

Now that #1326 is implemented (hopefully), and we have an internal API that manages event attendance status, we need a JMAP API that acts as a wrapper around that API.

How?

We would add one JMAP method for managing local user's event attendance status:

  • CalendarEventAttendance/get

We do not need to introduce a new capability and can use the exiting com:linagora:params:calendar:event capability to advertise that the server supports calling these new method.

CalendarEvent/accept, CalendarEvent/reject, and CalendarEvent/maybe would act as the setter for the event attendance status.

Below is the proposed API format:

We introduce the CalendarEventAttendance object:

  • id: Id. Must correspond to an id of an Email object.
  • evantAttendanceStatus: String. Represent the attendance status of the connected user to the event embedded as an attachment of the current email. Possible values:
    • Accepted
    • Declined
    • Tentative
    • NeedsAction

CalendarEventAttendance/get is a standard /get method.

It would return an error when called on an email that do not have an ICS attachment with method REQUEST (invalidArguments).

Examples:

  • CalendarEventAttendance/get
"methodCalls": [[
    "CalendarEventAttendance/get",
    {
      "accountId": "unknownAccountId",
      "ids": ["blobId1"]
    },
    "c1"]]

    "methodResponses": [[
    "CalendarEventAttendance/get",
    {
      "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
      "list": [
             {
                   "id": "blobId1",
                   "evantAttendanceStatus": "Accepted"
              }
        ]
    }

DoD

  • Integration Tests + Docs
@chibenwa
Copy link
Member Author

2 methods should likely be two tickets

@HoussemNasri
Copy link
Member

2 methods should likely be two tickets

As we decided earlier, we only need to implement the getter for event attendance, we use the existing APIs CalendarEvent/accept, CalendarEvent/reject, and CalendarEvent/maybe as the setter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants