linagora / tmail-backend

GNU Affero General Public License v3.0
36 stars 17 forks source link

[ICS Reply] CalendarEvent/reject JMAP method #951

Closed Arsnael closed 5 months ago

Arsnael commented 5 months ago

Based on #949 , add a JMAP method that will reject a calendar invitation and will reply back to the sender with the correct output patched ics file event.

Note: the reply will be a default hardcoded template for the time being.

This request:

{
    "using": ["urn:ietf:params:jmap:core", "com:linagora:params:calendar:event"],
    "methodCalls": [
        [ "CalendarEvent/reject", {
            "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
            "blobIds": ["0f9f65ab-dc7b-4146-850f-6e4881093965"]
        }, "c1"]
    ]
}

should answer:

        [ "CalendarEvent/reject", {
            "accountId": "29883977c13473ae7cb7678ef767cbfbaffc8a44a6e463d971d23a65c1dc4af6",
            "rejected": {
                "0f9f65ab-dc7b-4146-850f-6e4881093965": { }
            },
            "notFound": []
        }, "c1"]
    ]

DoD: JMAP Integration tests

vttranlina commented 5 months ago

When implementing CalendarEvent/accept I tried to extract some methods to generic, that we can re-use for reject, maybe method https://github.com/linagora/tmail-backend/pull/960

Arsnael commented 5 months ago

I've been spending more time debugging multiple builds these last few days, didnt advance much on this. But thanks :)

Arsnael commented 5 months ago

https://github.com/linagora/tmail-backend/pull/965