Re: [Jmap] [JMAP] CalendarEvent/parse proposition for the JMAP Calendar draft

René CORDIER <rcordier@linagora.com> Thu, 13 April 2023 03:29 UTC

Return-Path: <rcordier@linagora.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C677CC169501 for <jmap@ietfa.amsl.com>; Wed, 12 Apr 2023 20:29:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.692
X-Spam-Level:
X-Spam-Status: No, score=-1.692 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=neutral reason="invalid (public key: not available)" header.d=linagora.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oUJq9tSPthiA for <jmap@ietfa.amsl.com>; Wed, 12 Apr 2023 20:29:00 -0700 (PDT)
Received: from smtp.linagora.com (smtp.linagora.com [54.36.8.78]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5248DC15C52D for <jmap@ietf.org>; Wed, 12 Apr 2023 20:28:57 -0700 (PDT)
Received: from ?Open?PaaS?SMTP?server?for?Linagora? (unknown [51.83.109.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.linagora.com (Postfix) with ESMTPSA id 01AB73EE1D for <jmap@ietf.org>; Thu, 13 Apr 2023 05:28:56 +0200 (CEST)
DKIM-Signature: a=rsa-sha256; b=FZmM7y41ZD57belx8Q9T0vSJkSJjLHDcQkzmHD28saJxnMo0Npi6nFLSFPq3mjg/uHbm3FUi+9EDvPoyhuwBaLTpwd3TL5OdMLx89MkVOM7aEQA5U9DVJ/S9Zd7ghGhzaqqer47QQOemJ08gDY7uFuBDGBt4it3Cs+qooRWF78pRQPDtn//h5jwXHMil5jhLuKwuoR5Chu9F9iboBoSnh2397jwKTu2HoZOSrdEmQWVNF3ySVj3Gr9wUbNlkG5LH4igFw4EY9NdvK6OP1kxL9BL1logkUAgRwEybKklKYMp9a3JhlcfJPjbnRY4PxbUaDY/+Zy5watxpCaFBh/FfRg==; s=smtpoutjames; d=linagora.com; v=1; bh=eS3s15qLXEnKHbr+OFDjWAKDNyv5vnbMbTig0aifhbU=; h=from : reply-to : subject : date : to : cc : resent-date : resent-from : resent-sender : resent-to : resent-cc : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive;
MIME-Version: 1.0
X-LINAGORA-Copy-Delivery-Done: 1
From: René CORDIER <rcordier@linagora.com>
To: jmap@ietf.org
Reply-To: rcordier@linagora.com
Date: Thu, 13 Apr 2023 03:28:54 +0000
Message-ID: <Mime4j.74.8f73b6abba1c417d.18778a8b2df@linagora.com>
User-Agent: Team-Mail/0.7.6 Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Content-Type: multipart/alternative; boundary="-=Part.75.922d671a65033b4c.18778a8b2e0.fdda29a770e222de=-"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/Id_zx_c-jrOFMcYQSYN0ase11nY>
Subject: Re: [Jmap] [JMAP] CalendarEvent/parse proposition for the JMAP Calendar draft
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Apr 2023 03:29:04 -0000

Hi Robert,

Thanks for taking the time to read it and give your feedback !

I will answer inline.

Best regards,

Rene.

On Apr 12, 2023 3:08 PM, from Robert Stepanek Hi,

I'm much in favor of adding CalendarEvent/parse as an optional method to JMAP Calendars. Just as Email/parse parses MIME messages, CalendarEvent/parse should parse iCalendar data. Should there ever be the need to support other calendar formats, this still could be solved with a contentType argument.+1


On Wed, Apr 12, 2023, at 9:26 AM, René CORDIER wrote:
At Linagora we have an internal need of showing what we call a blue bar on top of Calendar event emails that you receive. It would allow the client to show the user details of a Calendar event he received in a nice and generic way when reading the corresponding email (because Calendar email sent events are not formatted the same way depending of the calendar).


We came up with a custom method called CalendarEvent/parse. It would allow to parse a .ics calendar file attached to the mail to extract properties defined in RFC5545 to allow client to show events from different calendars in the same way. 



At Fastmail and in the Cyrus IMAP server we support this use case with a non-standard calendarEvents property in the Email object. Any MIME body parts of type text/calendar will be rendered as JSCalendar events to this property in Email/get.

The Cyrus IMAP server also already supports CalendarEvent/parse if you use the https://cyrusimap.org/ns/jmap/calendars capability.Good to know you are using something similar internally, it means there is clearly a common need for such a method then I believe.


For more details, we have a document that defines our custom method here: https://github.com/linagora/tmail-backend/blob/master/docs/modules/ROOT/pages/tmail-backend/jmap-extensions/calendarEventParsing.adoc



I guess we will have more discussions about this should this get defined in JMAP Calendars but here are my remarks already (in no particular order):


 - +1 for using the applicable subsets of arguments of Email/parse. But I do think that a standard CalendarEvent/parse also needs to support the properties argument, rather than hard-coding in the spec the list of returned properties.

Agreed that to standardize the method, the properties argument should be supported.


 - Is there a reason why use you use different value type notations than the JMAP spec? e.g. your blobIds: [Id] definition would read blobIds: Id[] in standard JMAP notation. Similarly, parsed: Map[BlobId] notates that the value type of parsed is a JSON objects with keys of type Map (some subset of String) and values of type BlobId. But that's not what your example shows.

As said, some changes will be necessary to formalize this document to the RFC style. So this comment makes sense in this regard, thanks!


 - Your example shows that the parsed property maps a blobId to a single CalendarEvent. This will not work in the general case, as a blob with iCalendar data may contain multiple VEVENT components which do not parse to a single CalendarEvent. The most common scenario where we see that happening is for iTIP messages that contain two or more VEVENTs with the same UID and all of them having a RECURRENCE-ID. I suggest you change the value of parsed to a map of list of events, such as  parsed: Id[CalendarEvent[]].

+1, thanks for the clarification


 - I see that you document how to convert iCalendar properties to JSCalendar event properties. I guess that's on me, because we still did not manage to publish our RFC draft that standardizes how convert between the two formats: https://www.ietf.org/archive/id/draft-ietf-calext-jscalendar-icalendar-07.html For JMAP Calendars, I definitely would be against different a conversion scheme as part of CalendarEvent/parse and rather refer to the conversion guide RFC.

Good to know, thanks for the ref, we will take the time to check it !


Thanks!
Robert
_______________________________________________
Jmap mailing list
Jmap@ietf.org
https://www.ietf.org/mailman/listinfo/jmap