The React component seems to only forward activities that are typing or message to the activityMiddleware. This means I can't write client side code to react to bot events.
Using bot v4, if I send an activity like this
await step.context.sendActivities([
{ type: 'typing' },
{ type: 'event' },
{ type: 'event', value: "my event args" },
{ type: 'customEvent' },
{ type: 'customEvent', value: "cool stuff" },
{ type: 'message', text: 'My message' }
]);
and in the client side, I hook in an activityMiddleware
activityMiddleware = () => next => card => {
console.log(card.activity.type);
};
render() {
return (
<ReactWebChat activityMiddleware={this.activityMiddleware} directLine={this.directLine} userID="xxxx" />
);
}
when I check the browser console, only the typing and message activities are sent through to the middleware. No other activities show up.
The React component seems to only forward activities that are
typingormessageto the activityMiddleware. This means I can't write client side code to react to bot events.Using bot v4, if I send an activity like this
and in the client side, I hook in an activityMiddleware
when I check the browser console, only the
typingandmessageactivities are sent through to the middleware. No other activities show up.