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

[ICS Reply] ICS patching core process #949

Closed
Arsnael opened this issue Mar 4, 2024 · 1 comment · Fixed by #955
Closed

[ICS Reply] ICS patching core process #949

Arsnael opened this issue Mar 4, 2024 · 1 comment · Fixed by #955
Assignees

Comments

@Arsnael
Copy link
Member

Arsnael commented Mar 4, 2024

Write a method that would take an ICS as an input file, being an invitation to a calendar event (METHOD: REQUEST), that would the transform it in output into a METHOD: REPLY ICS event with the attendance of the participant (accept / reject / maybe)

Note:

  • Use method REPLY
  • Copy the TIMEZONE
  • Copy the VEVENT
  • Delete all participants, and keep just yourself

Example

Given I have this ics file as input:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.1.3//EN
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:Europe/Paris
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:8eae5147-f2df-4853-8fe0-c88678bc8b9f
TRANSP:OPAQUE
DTSTART;TZID=Europe/Paris:20240223T160000
DTEND;TZID=Europe/Paris:20240223T163000
CLASS:PUBLIC
SUMMARY:Simple event
ORGANIZER;CN=comptetest15.linagora@avocat.fr:mailto:comptetest15.linagora@a
 vocat.fr
ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVI
 DUAL:mailto:btellier@linagora.com
ATTENDEE;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;ROLE=REQ-PARTICIPANT;CUTYPE=INDIVI
 DUAL:mailto:other@linagora.com
ATTENDEE;PARTSTAT=ACCEPTED;RSVP=FALSE;ROLE=CHAIR;CUTYPE=INDIVIDUAL:mailto:c
 omptetest15.linagora@avocat.fr
DTSTAMP:20240222T204008Z
SEQUENCE:0
END:VEVENT
END:VCALENDAR

Accepting the invitation might result in something like this:

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:REPLY
BEGIN:VTIMEZONE
TZID:Europe/Paris
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:8eae5147-f2df-4853-8fe0-c88678bc8b9f
DTSTAMP:20240222T204343Z
SEQUENCE:0
DTSTART:20240223T150000Z
DTEND:20240223T153000Z
SUMMARY:Simple event
ORGANIZER;CN=comptetest15.linagora@avocat.fr:mailto:comptetest15.linagora@a
 vocat.fr
ATTENDEE;PARTSTAT=ACCEPTED:mailto:btellier@linagora.com
END:VEVENT
END:VCALENDAR

DoD: Unit tests

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

Successfully merging a pull request may close this issue.

2 participants