Re: [Jmap] Adding the Message::isForwarded property
Neil Jenkins <neilj@fastmail.com> Wed, 05 April 2017 05:36 UTC
Return-Path: <neilj@fastmail.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 80664129412 for <jmap@ietfa.amsl.com>; Tue, 4 Apr 2017 22:36:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.719
X-Spam-Level:
X-Spam-Status: No, score=-2.719 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmail.com header.b=jfmNWZY+; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=awCJ0zM7
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 Zq2T4heszmqt for <jmap@ietfa.amsl.com>; Tue, 4 Apr 2017 22:36:46 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 43F6C12940C for <jmap@ietf.org>; Tue, 4 Apr 2017 22:36:46 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id B17DE2094E for <jmap@ietf.org>; Wed, 5 Apr 2017 01:36:45 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Wed, 05 Apr 2017 01:36:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=5WyZAYdcX8YrGVjp1Dwwgh7z/Ehtu ReBKgfgVj2pWek=; b=jfmNWZY+lKUxH0lVMpDRg0MCiqYfSOsdJ1JABcUv8sLsZ jO22+yaLDqmQz8+EM22Bn8ci+NFXws+F2S4GSWh6Gs6d5ICJsqRc+gMDH2glwR0w RiTCMEvMJ18h314C9ePbqIUBhhQa7//2I3lqpVwhxX/K2Xk/g2c8zqKG5OzI1XMo 5+n5E2YLLDcFIZh6w24N/pL4bbUAYWDK4bjocmPgTCJhgTcyG8wF10Qcezefvluf JDqsVffqSuh9DIcIH8ifa6V/6E5whP8u86wMRFoO6wtFhArz3gTCFSs4yvxd9ANR OTyOxQNFkNcAQj+3drjmyo+9KUrQA/soJccsrnJmw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=5WyZAY dcX8YrGVjp1Dwwgh7z/EhtuReBKgfgVj2pWek=; b=awCJ0zM7aplZDx01q9YONP QJiR+JfFZiGrlmba4gFlbzKj9BI6CeLJwyivo62f3g8IudeOBX8HoraPaTJuB4OC Yn26ebGwZohSIsTUDRennsDqf6XjLdBOT4DBHXPo3w+35R9Q4YGQEB/8rtpVFuZq /CbFn0SvAjZqnVFJkthzx0IZcCtVhBJlmL/uihgcqa5dc2S2I/aek1cI78JEA81K tUiMzPhMBm1rK7CQb/xdAvj1QLzrI/AnRE3QCNhl46/5Xe/BRA/fZydV3sBKvm/r E7o0iqldsZPAt9ubAXlXw7kzIwmY2Bmr8BIFmyer76Uv4mJy+V+mlCzZPb/WTeTQ ==
X-ME-Sender: <xms:bYLkWL4qyALpB0vySjIwk9_J5YiTlNaTWPxybf_4pB76LiSSWzisnw>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 64F26E2561; Wed, 5 Apr 2017 01:36:45 -0400 (EDT)
Message-Id: <1491370605.1381724.934621536.30B3055A@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmail.com>
To: jmap@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_149137060513817241"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-c4fccc2b
Date: Wed, 05 Apr 2017 00:36:45 -0500
In-Reply-To: <59771DE7-35FB-49E3-BFC9-9EBD1268E88A@oracle.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>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/dcOmEW9A23jglbWyg_m-t7I3RVU>
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 05:36:48 -0000
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: 1. 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). 2. It's much harder to define patch semantics for an array. In CalConnect[1], 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. Links: 1. https://www.calconnect.org/
- Re: [Jmap] Adding the Message::isForwarded proper… Neil Jhaveri
- Re: [Jmap] Adding the Message::isForwarded proper… Neil Jenkins
- Re: [Jmap] Adding the Message::isForwarded proper… Chris Newman
- Re: [Jmap] Adding the Message::isForwarded proper… HANSEN, TONY L
- Re: [Jmap] Adding the Message::isForwarded proper… Alexey Melnikov
- Re: [Jmap] Adding the Message::isForwarded proper… Neil Jenkins
- Re: [Jmap] Adding the Message::isForwarded proper… Neil Jenkins
- Re: [Jmap] Adding the Message::isForwarded proper… Adrien de Croy
- [Jmap] Spencer Dawkins' No Objection on charter-i… Spencer Dawkins
- Re: [Jmap] Adding the Message::isForwarded proper… Neil Jhaveri
- Re: [Jmap] Adding the Message::isForwarded proper… Neil Jenkins
- [Jmap] message vs. annotation Dave Crocker
- [Jmap] Adding the Message::isForwarded property Benoit Tellier
- Re: [Jmap] Adding the Message::isForwarded proper… Benoit Tellier
- Re: [Jmap] Adding the Message::isForwarded proper… Chris Newman
- Re: [Jmap] Adding the Message::isForwarded proper… Alexey Melnikov
- Re: [Jmap] Adding the Message::isForwarded proper… Benoit Tellier
- Re: [Jmap] Adding the Message::isForwarded proper… Alexey Melnikov
- Re: [Jmap] Adding the Message::isForwarded proper… Benoit Tellier
- Re: [Jmap] Adding the Message::isForwarded proper… Chris Newman
- Re: [Jmap] Adding the Message::isForwarded proper… Neil Jenkins
- Re: [Jmap] message vs. annotation Neil Jenkins
- Re: [Jmap] message vs. annotation Ted Lemon
- Re: [Jmap] Adding the Message::isForwarded proper… Alexey Melnikov
- Re: [Jmap] Adding the Message::isForwarded proper… Adrien de Croy
- Re: [Jmap] Adding the Message::isForwarded proper… Neil Jenkins
- Re: [Jmap] Adding the Message::isForwarded proper… Benoit Tellier
- Re: [Jmap] Adding the Message::isForwarded proper… Chris Newman
- Re: [Jmap] Adding the Message::isForwarded proper… HANSEN, TONY L
- Re: [Jmap] Adding the Message::isForwarded proper… Bron Gondwana
- Re: [Jmap] Adding the Message::isForwarded proper… Neil Jenkins
- Re: [Jmap] Adding the Message::isForwarded proper… Alexey Melnikov