BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

Bug: API Hook 'postActivity' Issue

Open michalcislo opened this issue 1 year ago • 3 comments

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:

  1. Follow the reaction button example as provided in the botframework-webchat documentation.
  2. Implement the code as shown in the example.
  3. 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, and reactionsAdded does 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

michalcislo avatar Jul 22 '24 10:07 michalcislo

I am also experiencing this error: Type '"messageReaction"' is not assignable.

Copied the handleUpvoteButton right from here: https://github.com/microsoft/BotFramework-WebChat/tree/main/samples/05.custom-components/d.reaction-buttons#completed-code

SeanDonnellanJH avatar Aug 07 '24 16:08 SeanDonnellanJH

Hi @compulim

Could you please guide us in that matter?

michalcislo avatar Aug 19 '24 16:08 michalcislo

Bump

SeanDonnellanJH avatar Sep 18 '24 19:09 SeanDonnellanJH