Feature Request
In our code:
// TODO: [P2] We should move these into <Composer>
function createActivityRenderer(additionalMiddleware) {
const activityMiddleware = concatMiddleware(additionalMiddleware, createCoreActivityMiddleware())({});
return (...args) => {
try {
return activityMiddleware(({ activity }) => () => {
console.warn(`No activity found for type "${activity.type}".`);
})(...args);
} catch (err) {
const FailedRenderActivity = () => (
<ErrorBox message="Failed to render activity">
<pre>{JSON.stringify(err, null, 2)}</pre>
</ErrorBox>
);
return FailedRenderActivity;
}
};
}
Today, <Composer> accept activityRenderer only but not activityMiddleware. But <BasicWebChat> accept activityMiddleware.
Tomorrow, we should allow <Composer> to accept activityMiddleware too. If both activityMiddleware and activityRenderer is passed to <Composer>, we should give a warning and use activityRenderer instead.
This is also true for other middleware/renderers.
[Enhancement]
Feature Request
In our code:
Today,
<Composer>acceptactivityRendereronly but notactivityMiddleware. But<BasicWebChat>acceptactivityMiddleware.Tomorrow, we should allow
<Composer>to acceptactivityMiddlewaretoo. If bothactivityMiddlewareandactivityRendereris passed to<Composer>, we should give a warning and useactivityRendererinstead.This is also true for other middleware/renderers.
[Enhancement]