decentralized-identity / veramo

A JavaScript Framework for Verifiable Data
https://veramo.io
Apache License 2.0
431 stars 131 forks source link

feat(did-comm): sendDIDCommMessage - returnMessage #1283

Closed simonas-notcat closed 11 months ago

simonas-notcat commented 11 months ago

What is being changed

A return message will be included in the response to sendDIDCommMessage when return_route: 'all' is used in a packed message

const messageId = v4()
const packedMessage = await agent.packDIDCommMessage({ 
  message: {
    type: 'example',
    from: senderDid,
    to: recipientDidUrl,
    id: messageId,
    body: {},
    return_route: 'all'
  },
  packing: 'authcrypt'
})
const { returnMessage, transportId } = await agent.sendDIDCommMessage({ 
  packedMessage, messageId, recipientDidUrl
})

console.log(returnMessage)

Quality

Check all that apply:

codecov-commenter commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (ba88d6b) 84.98% compared to head (0acf227) 85.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## next #1283 +/- ## ========================================== + Coverage 84.98% 85.00% +0.01% ========================================== Files 167 167 Lines 18140 18154 +14 Branches 2040 2040 ========================================== + Hits 15417 15431 +14 Misses 2723 2723 ``` | [Files](https://app.codecov.io/gh/decentralized-identity/veramo/pull/1283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=decentralized-identity) | Coverage Δ | | |---|---|---| | [packages/did-comm/src/didcomm.ts](https://app.codecov.io/gh/decentralized-identity/veramo/pull/1283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=decentralized-identity#diff-cGFja2FnZXMvZGlkLWNvbW0vc3JjL2RpZGNvbW0udHM=) | `85.65% <100.00%> (+0.21%)` | :arrow_up: | | [...d-comm/src/protocols/trust-ping-message-handler.ts](https://app.codecov.io/gh/decentralized-identity/veramo/pull/1283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=decentralized-identity#diff-cGFja2FnZXMvZGlkLWNvbW0vc3JjL3Byb3RvY29scy90cnVzdC1waW5nLW1lc3NhZ2UtaGFuZGxlci50cw==) | `89.88% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.