roots-id / didcomm-mediator

Apache License 2.0
9 stars 6 forks source link

Wrong field `recipient_key` instead of `recipient_did` in delivery message in Pickup V3 protocol #23

Open antonbaliasnikov opened 1 year ago

antonbaliasnikov commented 1 year ago

Bug overview

Accordingly to https://didcomm.org/pickup/3.0/ protocol, the https://didcomm.org/messagepickup/3.0/delivery response should have a field named recipient_did in the response body:

{
    "id": "123456780",
    "thid": "<message id of delivery-request message>",
    "type": "https://didcomm.org/messagepickup/3.0/delivery",
    "body": {
        "recipient_did": "<did for messages>"
    },
    "attachments": [{
        "id": "<id of message>",
        "data": {
            "base64": "<message>"
        }
    }]
}

But the RootsID mediator returns the field named recipient_key instead. An example of a response:

{
    "id": "e1840d83-3333-4a18-94e5-d2070ae4c40e",
    "typ": "application\/didcomm-plain+json",
    "type": "https://didcomm.org/messagepickup/3.0/status",
    "body": {
        "live_delivery": false,
        "recipient_key": "did:peer:...",
        "message_count": 0
    }
}

Expected behavior

The recipient_key field in the body response should be named recipient_did accordingly to the protocol description.

rodolfomiranda commented 1 year ago

Thanks @antonbaliasnikov . We haven't update the code with the latest updates in the spec. We'll do it.