linagora / tmail-backend

GNU Affero General Public License v3.0
41 stars 22 forks source link

JMAP CalendarEvent/parse for organizer, participants, extensionFields #571

Closed quantranhong1999 closed 1 year ago

quantranhong1999 commented 1 year ago

Similar to https://github.com/linagora/tmail-backend/issues/565 but for organizer, participants, extensionFields

Request:

{
    "using": [
        "urn:ietf:params:jmap:core",
        "com:linagora:params:calendar:event"
    ],
    "methodCalls": [
        [
            "CalendarEvent/parse",
            {
                "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
                "blobIds": ["blobIdParsable", "blobIdNotParsable", "blobIdNotFound"]
            },
            "c1"
        ]
    ]
}

Response:

{
    "sessionState": "2c9f1b12-b35a-43e6-9af2-0106fb53a943",
    "methodResponses": [
        [
            "CalendarEvent/parse",
            {
                "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
                "notFound": ["blobIdNotFound"],
                "notParsable": ["blobIdNotParsable"],
                "parsed": {
                    "blobIdParsable": {
                        "organizer": {
                            "name": "Benoît TELLIER",
                            "mailto": "btellier@linagora.com"
                        },
                        "participants": [{
                                "name": "Benoît TELLIER",
                                "mailto": "btellier@linagora.com",
                                "kind": "individual",
                                "role": "chair",
                                "participationStatus": "accepted",
                                "expectReply": false
                            },
                            {
                                "name": "Van Tung TRAN",
                                "mailto": "vttran@linagora.com",
                                "kind": "individual",
                                "role": "requested-participant",
                                "participationStatus": "needs-action",
                                "expectReply": true
                            }
                        ],
                        "extensionFields": {
                            "X-OPENPAAS-VIDEOCONFERENCE": "https://jitsi.linagora.com/abcd",
                            "X-OPENPAAS-CUSTOM-HEADER1": "whatever"
                        }
                    }
                }
            },
            "c1"
        ]
    ]
}
chibenwa commented 1 year ago

Please sample jmap request response...

vttranlina commented 1 year ago

PR : https://github.com/linagora/tmail-backend/pull/603

vttranlina commented 1 year ago

What format of extensionFields if duplicate field? I suggest changing to :

"extensionFields": {
        "X-OPENPAAS-CUSTOM-HEADER1":  ["value1", "value2" ]
                        }
chibenwa commented 1 year ago

What format of extensionFields if duplicate field?

What does the spec says?

I suggest changing to :

We can't choose what we do...

vttranlina commented 1 year ago

What does the spec says?

=> Value Type: The default value type is TEXT. The value type can be set to any value type. https://www.rfc-editor.org/rfc/rfc5545#section-3.8.8.2

chibenwa commented 1 year ago

Then ok for: => "X-OPENPAAS-CUSTOM-HEADER1": ["value1", "value2" ]

And

=> "X-OPENPAAS-CUSTOM-HEADER1": "value2"