Closed Naktibalda closed 5 years ago
Merging #185 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #185 +/- ##
=======================================
Coverage 77.27% 77.27%
=======================================
Files 2 2
Lines 110 110
Branches 23 23
=======================================
Hits 85 85
Misses 21 21
Partials 4 4
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update f4b86da...a13cd05. Read the comment docs.
I realized that workspace_id is already defined in MessageParams, so there is no need to have Payload interface, but I kept it for backwards compatibility just in case someone is using it in their code.
I added MessageParams and MessageResponse to all places where they are appropriate - after, before and postMessage. Also MessageResponse is a type of watsonData field in BotkitWatsonMessage.
:tada: This PR is included in version 2.1.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
I tried to add headers to payload using this code:
but compilation failed with:
Result of
before
hook is passed to postMessage which callsconversation.message(payload);
https://github.com/watson-developer-cloud/botkit-middleware/blob/v2.1.1/src/index.ts#L162-L163 https://github.com/watson-developer-cloud/botkit-middleware/blob/v2.1.1/src/utils.ts#L79-L84message
method is defined at https://github.com/watson-developer-cloud/node-sdk/blob/v4.2.0/assistant/v1.ts#L98and it takes MessageParams type as the first argument: