Search code examples
phplaravellaravel-8icalendar

ICalendar with Spatie/ICalendar-Generator creating new meetings rather than updating in Outlook


After taking a look through the following question on SO I added some additional fields and remove some current fields inside the ICS file.

My invitation renders like so:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:spatie/icalendar-generator
NAME:Test ICS 2
X-WR-CALNAME:Test ICS 2
DESCRIPTION:Test ICS 2
X-WR-CALDESC:Test ICS 2
X-WR-RELCALID:someConstValue.ba7be5f8-7404-4bf8-bfe6-80c17e9ade76
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VTIMEZONE
TZID:Europe/London
BEGIN:STANDARD
DTSTART:20211031T020000Z
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20220327T010000Z
TZOFFSETFROM:+0000
TZOFFSETTO:+0100
END:DAYLIGHT
BEGIN:STANDARD
DTSTART:20221030T020000Z
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
END:STANDARD
END:VTIMEZONE
BEGIN:VTIMEZONE
TZID:UTC
BEGIN:STANDARD
DTSTART:20211028T100304Z
TZOFFSETFROM:+0000
TZOFFSETTO:+0000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:someConstValue.ba7be5f8-7404-4bf8-bfe6-80c17e9ade76
DTSTAMP:20220725T100304Z
SUMMARY:Test ICS 2
DESCRIPTION:Test ICS 2
LOCATION:TRUNCATED
CLASS:PRIVATE
STATUS:CONFIRMED
ORGANIZER;CN=TRUNCATED
ATTENDEE;CN=TRUNCATED
DTSTART;TZID=Europe/London:20220725T140000
DTEND;TZID=Europe/London:20220725T143000
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:Test ICS 2 is going to start in 15 minutes.
TRIGGER:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR

I now want to update the time, so I resend an update ICS like so:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:spatie/icalendar-generator
NAME:Test ICS 2
DESCRIPTION:Test ICS 2
X-WR-CALDESC:Test ICS 2
X-WR-RELCALID:someConstValue.ba7be5f8-7404-4bf8-bfe6-80c17e9ade76
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VTIMEZONE
TZID:Europe/London
BEGIN:STANDARD
DTSTART:20211031T020000Z
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20220327T010000Z
TZOFFSETFROM:+0000
TZOFFSETTO:+0100
END:DAYLIGHT
BEGIN:STANDARD
DTSTART:20221030T020000Z
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
END:STANDARD
END:VTIMEZONE
BEGIN:VTIMEZONE
TZID:UTC
BEGIN:STANDARD
DTSTART:20211028T100354Z
TZOFFSETFROM:+0000
TZOFFSETTO:+0000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:someConstValue.ba7be5f8-7404-4bf8-bfe6-80c17e9ade76
DTSTAMP:20220725T100354Z
SUMMARY:Test ICS 2
DESCRIPTION:Test ICS 2
LOCATION:TRUNCATED
CLASS:PRIVATE
STATUS:CONFIRMED
ORGANIZER;CN=TRUNCATED
ATTENDEE;CN=TRUNCATED
DTSTART;TZID=Europe/London:20220725T140500
DTEND;TZID=Europe/London:20220725T143000
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:Test ICS 2 is going to start in 15 minutes.
TRIGGER:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR

I added X-MS-OLK-FORCEINSPECTOROPEN, X-WR-RELCALID and removed X-WR-CALNAME when sending updates as the previous SO threads explain but this still generates a new event in Outlook as apposed to updating the current one.

Can anyone point me in the right direction to what I am missing?


Solution

  • From what I can see in the linked original SO question, a value is required for the METHOD field, which you are currently missing, to be able to update the invitation in Outlook

    In summary you have to specify METHOD:REQUEST and ORGANIZER:xxxxxxxx in addition to UID: and SEQUENCE: