Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

outlook - Can't cancel an event with an ics from the browser, but in works in the desktop app

I am trying to create/delete events using smallest_created.ics and smallest_cancelled.ics.

smallest_created.ics content:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//TEST cie//test//EN
METHOD:REQUEST
BEGIN:VEVENT
UID:1f22a659-bea8-4297-8f83-7ccf802da82f
STATUS:CONFIRMED
SEQUENCE:0
ORGANIZER;CN=??:MAILTO:[email protected]
ATTENDEE;CN=test abc test:MAILTO:[email protected]
SUMMARY:Test smallest
DTSTART:20210122T230000Z
DTEND:20210123T000000Z
DTSTAMP:20210121T141557Z
END:VEVENT
END:VCALENDAR

smallest_cancelled.ics content:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//TEST cie//test//EN
METHOD:CANCEL
BEGIN:VEVENT
UID:1f22a659-bea8-4297-8f83-7ccf802da82f
STATUS:CANCELLED
SEQUENCE:1
ORGANIZER;CN=??:MAILTO:[email protected]
ATTENDEE;CN=test abc test:MAILTO:[email protected]
SUMMARY:Test smallest
DTSTART:20210122T230000Z
DTEND:20210123T000000Z
DTSTAMP:20210121T141614Z
END:VEVENT
END:VCALENDAR

I send an email containing both files to an Office365 account (opens to https://outlook.office365.com/) and to an outlook account (opens to https://outlook.live.com/).

For both accounts, I can add the event to the calendar through the website and through the outlook desktop app.

However, it fails to cancel the event if I do "Add to calendar" in the browser.

chrome debugger

If I open the outlook desktop app and I do "Open" on smallest_cancelled.ics, I get a prompt saying "Add this Internet Calendar to Outlook?". When I press "Yes", a new window opens with the event and the option to remove it from my calendar

cancelation with METHOD:CANCEL in outlook desktop app gif

At this point, I can close the window and I'll have the event appear the same in my calendar.

Based on the RFC 2446 section 3.2, which is referenced by the RFC 5545 section 3.7.2, METHOD:CANCEL is the right way to indicate that an event is canceled.

As posted in this StackOverflow thread, changing the content of smallest_cancelled.ics to METHOD:REQUEST will make it work if I try to cancel the event through the website. However, if I open the outlook desktop app and I do "Open" on smallest_cancelled.ics, I get a prompt saying "Add this Internet Calendar to Outlook?". When I press "Yes", a new window opens with the event and I no longer have the option to remove it from my calendar

cancelation with METHOD:REQUEST in outlook desktop app gif

I believe the behavior of the outlook desktop app with METHOD:CANCEL to be the right one.

How can I cancel the event through both the website and the desktop app without sending 2 cancelation ics files?

question from:https://stackoverflow.com/questions/65831294/cant-cancel-an-event-with-an-ics-from-the-browser-but-in-works-in-the-desktop

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...