Skip to content

React component not forwarding all activities to the activityMiddleware #1547

@DavidBurela

Description

@DavidBurela

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.

Metadata

Metadata

Assignees

Labels

front-burnerp1Painful if we don't fix, won't block releasingsize-l4-8 days

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions