* Neil Jenkins <
ne...@fastmail.com> [2016-08-30T18:55:55]
> Now if you are setting rather than getting, we need to define what
> happens should a client both set a `from` or `to` property AND include a
> `from` or `to` field inside a `headers` property (even though it's
> unlikely a client would ever do this in practice, at least
> intentionally). The spec says in this case the `from`/`to` properties
> overwrite the version in the `headers` property.
>
> Is that clearer?
I think Matt has asked a different question than you answered.
*
wolf...@gmail.com [2016-08-29T22:11:48]
> Under setMessages - "Saving a Draft"
>
> - *from*: Optional. Overrides a “From” in the *headers*.
> - *to*: Optional. Overrides a “To” in the *headers*.
> Since this doesn't specify a different data type, I expect these to both be
> arrays of hashes.
>
> However it looks like from is actually just a hash, and to is still an
> array (at least as far as the JMAP Proxy is concerned).
When given "from" and "to" to the "create" stanza of setMessages, one would
expect it to take the same datatypes that are returned by getMessages. That
is, you'd expect that you must pass `Emailer[]|null` for both from and to.
Matt said that "as far as the JMAP Proxy is concerned" the types are `Emailer`
for from, but `Emailer[]` for to. So he was saying, "If the args to
setMessages differ from getMessages, it should be documented."
I consulted the history of the spec and found this:
https://github.com/jmapio/jmap/commit/7b45eb3c2e4983d17a819775238a28746cc7dc01
The "from" attribute only became an array in February, and the JMAP Proxy has
not yet been updated to match the spec.
So: there's your answer, Matt. I leave it to you to file a GitHub Issue.
--
Ricardo Signes (rjbs)
Research & Development, IC Group