Avatars and Decorating with activityMiddleware do not play well together
See original GitHub issueI am struggling with this for some time now (see also this SO question). I reproduced the issue using the samples so hopefully you guys can shed some light on this.
The problem: Avatars are not shown as soon as you use activity middleware for decorating.
To reproduce:
step 1. Clone the sample with the password input. step 2 Add this code to the index.html
const styleOptions = {
botAvatarInitials: 'WC',
};
and pass styleOptions={styleOptions} in ReactWebChat
window.ReactDOM.render(
<ReactWebChat
activityMiddleware={activityMiddleware}
directLine={window.WebChat.createDirectLine({ token })}
store={store}
styleOptions={styleOptions}
/>,
document.getElementById('webchat')
);
Step 3. Send ‘sample:password-input’ to the the mock bot. The password input form is shown but no avatar Step 4. Send ‘Hi’ to mock-bot. The avatar is shown with the response.
For some reason, avatars are not shown when I decorate based on an evetn sent by the bot-code. This used to work before 4.14. Should I use a workaround?
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Webchat: unable to render new elements using ...
With activitymiddleware and showAvatarInGroup : 'group' -> typing indicators are rendered as expected and the Avatar as well as the ...
Read more >Avatar Middleware does not register new activity until switch in ...
When utilizing avatar middleware, the hook seems to store the first activity when change in "fromUser" and does not register new activity ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nope. Wanted you give you the honour to close it.
@HesselWellema, thanks for bringing this to our attention. I will attempt a repro of this and let you know what I find.