Re: [Jmap] Adding the Message::isForwarded property

"Adrien de Croy" <adrien@qbik.com> Wed, 05 April 2017 20:51 UTC

Return-Path: <adrien@qbik.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 A86DD129490 for <jmap@ietfa.amsl.com>; Wed, 5 Apr 2017 13:51:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yVaXk0ij91co for <jmap@ietfa.amsl.com>; Wed, 5 Apr 2017 13:51:50 -0700 (PDT)
Received: from smtp.qbik.com (smtp.qbik.com [122.56.26.1]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D93541270A0 for <jmap@ietf.org>; Wed, 5 Apr 2017 13:51:38 -0700 (PDT)
Received: From [192.168.1.146] (unverified [192.168.1.146]) by SMTP Server [192.168.1.3] (WinGate SMTP Receiver v9.0.5 (Build 5926)) with SMTP id <0001009857@smtp.qbik.com>; Thu, 06 Apr 2017 08:51:35 +1200
From: Adrien de Croy <adrien@qbik.com>
To: Neil Jenkins <neilj@fastmail.com>, "jmap@ietf.org" <jmap@ietf.org>
Date: Wed, 05 Apr 2017 20:51:35 +0000
Message-Id: <eme4c35d96-e227-4310-a25d-f1585e36becf@bodybag>
In-Reply-To: <1491370605.1381724.934621536.30B3055A@webmail.messagingengine.com>
References: <148716911729.17277.15371202023742081890.idtracker@ietfa.amsl.com> <b7ec34d3-3aaf-82af-3663-5b0966c83ff0@dcrocker.net> <b5753f7f-92f9-50dd-42f0-ce0de7360e08@linagora.com> <A9EDBE7D-4E3D-45C2-BB97-F74AC9DB9486@oracle.com> <9eb1fd3c-8868-9d24-6c30-46d333b69fef@isode.com> <3c1711a2-46dd-db1c-506e-5e1ad89ce56d@linagora.com> <92769755-62c6-7257-ce3d-7d0b5699735d@isode.com> <59771DE7-35FB-49E3-BFC9-9EBD1268E88A@oracle.com> <1491370605.1381724.934621536.30B3055A@webmail.messagingengine.com>
Reply-To: Adrien de Croy <adrien@qbik.com>
User-Agent: eM_Client/7.0.27943.0
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="------=_MBE1E99019-8CCC-4DC4-BBBE-51D5DCC18EFF"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/uXs9AYSpGOCaEIingaJpKsa7aLE>
Subject: Re: [Jmap] Adding the Message::isForwarded property
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
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: Wed, 05 Apr 2017 20:51:54 -0000

Is there no equivalent to set?  E.g. a sorted container whose keys are 
also the values?

Saves the meaningless value issue.

Adrien

------ Original Message ------
From: "Neil Jenkins" <neilj@fastmail.com>
To: "jmap@ietf.org" <jmap@ietf.org>
Sent: 5/04/2017 5:36:45 PM
Subject: Re: [Jmap] Adding the Message::isForwarded property

>The existing isFoo properties on the Message object correspond to IMAP 
>system flags, so I think they are OK to be special, but since we know 
>we need generic access to IMAP user flags I agree we should just do 
>that and use the IANA registry rather than adding a special isForwarded 
>flag.
>
>My suggestion would be to add a keywords property to the Message 
>object, which corresponds to the list of IMAP user flags. There is a 
>question of what type this should be. An array is one option, but this 
>has two downsides:
>The server must sort it to ensure a consistent representation is 
>returned (probably just by ASCII code point, and for compatibility with 
>IMAP the flags will have to be ASCII). This then leads to the question 
>of whether the server accepts an unsorted array from the client when 
>updating it (probably yes, but then it's returning something that's 
>semantically different at the JSON layer to what was set, to represent 
>something semantically the same at the application layer).
>It's much harder to define patch semantics for an array. In CalConnect 
><https://www.calconnect.org/>, we've been working on a new JSON 
>representation for event data, and there are often many "complex" 
>properties on the event (e.g. set of alarms). Over time we've moved to 
>having everything as a map with an id as the key, rather than an array, 
>so that we can more easily patch event objects.
>So I would advocate for making the keywords property type Object, with 
>the keywords as the keys, each mapping to a Boolean true as the value. 
>This avoids the above two issues, although at the expense of having an 
>irrelevant "value" in the map for each keyword.
>
>To enable searching I would add the following properties to the 
>MessageList FilterCondition:
>hasKeyword: `String|null`
>notKeyword: `String|null`
>
>With regards to the special server behaviour for the $Forwarded 
>keyword, I think we can define this without adding a 
>forwardingMessageId property. We can just define that the server should 
>look for the X-Forwarded-Message-Id header on the message, and then 
>search for message(s) with this RFC5322 message id, and add the 
>$Forwarded keyword to any it finds.
>
>The current inReplyToMessageId property on the Message object is 
>actually problematic, because it's meant to be the JMAP message id, 
>which can change if the original message is delivered and/or deleted 
>after the reply is fetched, but the property is meant to be immutable.
>
>I think we can actually just drop the inReplyToMessageId property 
>altogether. Instead, clients can simply set the In-Reply-To and 
>References headers directly, and the server can use the In-Reply-To 
>header to search for the message(s) to set as replied, just like with 
>$Forwarded.
>
>Neil.