Skip to content

Event attendance should be backed by DAV #2425

@chibenwa

Description

@chibenwa

Why

Do like blue bar in OpenPaaS INBOX.

Exact synch between calendar and TMail.

  • I should see my attendance status
  • Updates should work for all invitations, not just OpenPaaS ones.

No longer rely on HTML parsing...

Summary

Request breakdown

Same creds than Tmail shall be used with the DAV server.

Request 1: Get the OpenPaaS identifier

$ curl -H 'Authorization: Bearer XXX' 
    -X GET https://openpaas.linagora.com/api/[email protected] | jq '.[]._id'

"5f50a663bdaffe002629099c"

Request 2: fron the `` header lookup the event on the calendar

REPORT https://dav.linagora.com/calendars/{userId}.json
   -H 'Accept: application/json' 
   -H 'Content-Type: application/json' 
   -H 'Authorization: Bearer XXX'

Payload: {"uid":"xyz"}"

{"_links":{"self":{"href":"\/calendars\/5f50a663bdaffe002629099c.json"}},"_embedded":{"dav:item":[{"_links":{"self":{"href":"\/calendars\/5f50a663bdaffe002629099c\/5f50a663bdaffe002629099c\/sabredav-75da98a6-3b1b-437f-84aa-418f491c6c8b.ics"}},"etag":"\"9a53fbd47d1bc61c18c7cedde2eeb34c\"","data":["vcalendar",[["version",{},"text","2.0"],["prodid",{},"text","-\/\/Sabre\/\/Sabre VObject 4.1.3\/\/EN"],["calscale",{},"text","GREGORIAN"]],[["vtimezone",[["tzid",{},"text","Europe\/Paris"]],[["daylight",[["tzoffsetfrom",{},"utc-offset","+01:00"],["tzoffsetto",{},"utc-offset","+02:00"],["tzname",{},"text","CEST"],["dtstart",{},"date-time","1970-03-29T02:00:00"],["rrule",{},"recur",{"freq":"YEARLY","bymonth":"3","byday":"-1SU"}]],[]],["standard",[["tzoffsetfrom",{},"utc-offset","+02:00"],["tzoffsetto",{},"utc-offset","+01:00"],["tzname",{},"text","CET"],["dtstart",{},"date-time","1970-10-25T03:00:00"],["rrule",{},"recur",{"freq":"YEARLY","bymonth":"10","byday":"-1SU"}]],[]]]],["vevent",[["uid",{},"text","b8fa32db-1551-4e9f-baea-c646f1526c3a"],["transp",{},"text","OPAQUE"],["dtstart",{},"date","2024-04-17"],["dtend",{},"date","2024-04-20"],["class",{},"text","PUBLIC"],["x-openpaas-videoconference",{},"unknown",""],["summary",{},"text","DEVOXX 2024"],["organizer",{"cn":"Fr\u00e9d\u00e9ric HERMELIN"},"cal-address","mailto:[email protected]"],["dtstamp",{},"date-time","2023-10-09T14:16:09Z"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Alexandre ZAPOLSKY"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"ACCEPTED","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Michel-Marie MAUDET"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Raoul DELPECH"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"ACCEPTED","rsvp":"FALSE","role":"CHAIR","cutype":"INDIVIDUAL","cn":"Fr\u00e9d\u00e9ric HERMELIN"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Capucine WALTER"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"TENTATIVE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Pascal VILAREM"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"ACCEPTED","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Beno\u00eet TELLIER"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"ACCEPTED","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Florian DANIEL"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"ACCEPTED","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Nicolas CHRISTODOULOU"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Bertrand ESCUDIE"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Damien LAINE"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Ga\u00ebl LAGO"},"cal-address","mailto:[email protected]"],["sequence",{},"integer",0]],[]]]],"status":200}]}}

Request 3: Manage participant status

Copy the JSON, patch participation status for only the local user (here btellier "partstat":"ACCEPTED" -> "partstat":"TENTATIVE")

Note: the self link can be obtained by parsing the event above (href).

PUT https://dav.linagora.com/calendars/5f50a663bdaffe002629099c/5f50a663bdaffe002629099c/sabredav-75da98a6-3b1b-437f-84aa-418f491c6c8b.ics

["vcalendar",[["version",{},"text","2.0"],["prodid",{},"text","-//Sabre//Sabre VObject 4.1.3//EN"],["calscale",{},"text","GREGORIAN"]],[["vtimezone",[["tzid",{},"text","Europe/Paris"]],[["daylight",[["tzoffsetfrom",{},"utc-offset","+01:00"],["tzoffsetto",{},"utc-offset","+02:00"],["tzname",{},"text","CEST"],["dtstart",{},"date-time","1970-03-29T02:00:00"],["rrule",{},"recur",{"freq":"YEARLY","bymonth":"3","byday":"-1SU"}]],[]],["standard",[["tzoffsetfrom",{},"utc-offset","+02:00"],["tzoffsetto",{},"utc-offset","+01:00"],["tzname",{},"text","CET"],["dtstart",{},"date-time","1970-10-25T03:00:00"],["rrule",{},"recur",{"freq":"YEARLY","bymonth":"10","byday":"-1SU"}]],[]]]],["vevent",[["uid",{},"text","b8fa32db-1551-4e9f-baea-c646f1526c3a"],["transp",{},"text","OPAQUE"],["dtstart",{},"date","2024-04-17"],["dtend",{},"date","2024-04-20"],["class",{},"text","PUBLIC"],["x-openpaas-videoconference",{},"unknown",""],["summary",{},"text","DEVOXX 2024"],["organizer",{"cn":"Frédéric HERMELIN"},"cal-address","mailto:[email protected]"],["dtstamp",{},"date-time","2023-10-09T14:16:09Z"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Alexandre ZAPOLSKY"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"ACCEPTED","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Michel-Marie MAUDET"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Raoul DELPECH"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"ACCEPTED","rsvp":"FALSE","role":"CHAIR","cutype":"INDIVIDUAL","cn":"Frédéric HERMELIN"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Capucine WALTER"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"TENTATIVE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Pascal VILAREM"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"TENTATIVE","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Benoît TELLIER"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"ACCEPTED","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Florian DANIEL"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"ACCEPTED","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Nicolas CHRISTODOULOU"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Bertrand ESCUDIE"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Damien LAINE"},"cal-address","mailto:[email protected]"],["attendee",{"partstat":"NEEDS-ACTION","rsvp":"TRUE","role":"REQ-PARTICIPANT","cutype":"INDIVIDUAL","cn":"Gaël LAGO"},"cal-address","mailto:[email protected]"],["sequence",{},"integer",0]],[]]]]

=> 204

TODO

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions