Closed Arsnael closed 4 months ago
I think response should be:
[
"Members/get",
{
"list": [{
"id": "team-mailbox-name",
"members": [
{
"username": "bob@domain.tld" ,
"role": "manager"
},
{
"username": "alice@domain.tld" ,
"role": "member"
}
]
}]
},
"#0
]
@hungphan227 I'm ok with this
I think response should be:
Why? I tend not to agree with that.
Remember that the /set update relies on the username
as the key to update the role. And that is why I proposed members: String[Role]. A JSON object where the keys are usernames (as strings) and the values are Role objects.
cf https://github.com/linagora/tmail-backend/blob/master/docs/modules/ROOT/pages/tmail-backend/jmap-extensions/jmapTeamMailboxMembers.adoc#teammailboxmember-object
Just like the JMAP specs for Email/set keywords: keywords: String[Boolean] (default: {}) A set of keywords that apply to the Email. The set is represented as an object, with the keys being the keywords. The value for each key in the object MUST be true.
cf https://jmap.io/spec-mail.html#properties-of-the-email-object
What is the point of /set update by the key but not knowing which is the key for the patch (being hidden in the object as other fields)?
What is the point of /set update by the key but not knowing which is the key for the patch (being hidden in the object as other fields)?
Is it just your idea or is it based on any standard?
Is it just your idea or is it based on any standard?
Base on the Email/set update keywords standard, as I said above.
Is it just your idea or is it based on any standard?
Base on the Email/set update keywords standard, as I said above.
I ask Email/set, not Email/get
I ask Email/set, not Email/get
Actually, it is the Email object that is shared by both Email/set and Email/get. Feel free to read the JMAP Email specs, examples, and contract tests... to double check that :)
I am surprised that you approved this extension specs PR though.
Request:
Response:
Notes:
ids
field in the request would end up giving the user the list of members of all team mailboxes he belongs toDoD: Integration tests