microsoft / BotFramework-WebChat

A highly-customizable web-based client for Azure Bot Services.
https://www.botframework.com/
MIT License
1.58k stars 1.53k forks source link

Modify the payload to /directline/conversations/{id}/activities #1794

Closed thedrew12 closed 5 years ago

thedrew12 commented 5 years ago

I'm using the React component to work with the bot framework and I need to modify the entities array to send along more information when a user asks a question. Is this possible? I've been trying to work with the activityMiddleware prop, but that doesn't seem to work.

thedrew12 commented 5 years ago

I found this example, https://github.com/Microsoft/BotFramework-WebChat/blob/master/samples/15.a.backchannel-piggyback-on-outgoing-activities/README.md, and that seems to work, but it seems like you should be able to tap into the activityMiddleware to do this instead of creating a store.

corinagum commented 5 years ago

Hey @thedrew12, activityMiddleware is for changing how Web Chat renders specific activities. This doesn't change how the activity is sent to the bot. Using 15.a.backchannel-piggyback-on-outgoing-activities and creating a new store is right. :)

576180 commented 1 year ago

hey, the community I am searching solution for an alternative to creating the store in piggy backing. I'm using react webchat speak service