microsoft / microsoft/BotFramework-WebChat
Bug: API Hook 'postActivity' Issue
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.8k
- Forks
- 1.6k
- Avg merge
- 22h 58m
- Merged PRs (30d)
- 2
Description
Is it an issue related to Adaptive Cards?
No
Is this an accessibility issue?
No
What version of Web Chat are you using?
Latest production
Which distribution are you using Web Chat from?
NPM
Which hosting environment does this issue primarily affect?
Web apps
Which browsers and platforms do the issue happened?
No response
Which area does this issue affect?
Hooks
Which theme pack does this issue affect?
I did not test it on other theme packs
What is the public URL for the website?
No response
Please describe the bug
I am experiencing issues with the API hook postActivity.
Specifically:
API Hook postActivity Argument Type Mismatch:
The hook specified in the API package does not work as described in the documentation. It appears to take a different argument type than what is mentioned.
Do you see any errors in console log?
No response
How to reproduce the issue?
API Hook postActivity Argument Type Mismatch:
- Follow the reaction button example as provided in the botframework-webchat documentation.
- Implement the code as shown in the example.
- Observe one of the errors: 'Type '
messageReaction' is not assignable to type 'message|typing|event|conversationUpdate|invoke'.' or 'Object literal may only specify known properties, andreactionsAddeddoes not exist in type...'
What do you expect?
The functionality to send an activity to the Azure bot with replyToId and reactionsAdded in order to further process the reaction to a given bot's message.
What actually happened?
The API postActivity hook, when used as described in the documentation, results in an error due to an argument type mismatch. It appears that the hook requires a different argument type than what is specified.
Do you have any screenshots or recordings to repro the issue?
No response
Adaptive Card JSON
No response
Additional context
botframework-webchat: 4.18.0
botframework-webchat-api: 4.18.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with samples/05.custom-components/d.reaction-buttons and the botframework-webchat-api postActivity type used by that example. Compare the documented reaction activity with the published 4.18.0 API declaration, then verify that the example's TypeScript usage compiles and matches the supported postActivity argument shape.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100