-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
On Conversation retention, user messages are returned as Bot messages on first refresh, so the UI is not differentiating bot message vs user message
Screenshots

Highlighted are user messages entered before refresh. The last message is entered by user after refresh, user messages should appear in this style.
Version
webchat es5 version 4.13.0
https://cdn.botframework.com/botframework-webchat/4.13.0/webchat-es5.js
Integrating the CDN version js directly on the page using script tag (No Iframe). Testing on Desktop/Mobile browsers (Chrome/Safari)
<meta name="botframework-directlinespeech:version" content="4.13.0">
<meta name="botframework-webchat:bundle:variant" content="full-es5">
<meta name="botframework-webchat:bundle:version" content="4.13.0">
<meta name="botframework-webchat:core:version" content="4.13.0">
<meta name="botframework-webchat:ui:version" content="4.13.0">
Describe the bug
We enabled conversation retention with webchat, so that the bot will show the messages even after page refresh or navigating to different page in same site. The user entered messages are coming as Bot messages after first refresh. if user entering message after refresh then those messages are appearing as user messages even after refresh. But the first set of messages always shown as Bot messages. This will create confusion to user as all the messages displayed as bot messages.
We apply styling to the user messages using CSS ".webchat__bubble--from-user, .webchat__bubble--from-user .webchat__bubble__content". But the user messages are rendering without these classes after refresh, so not able to applying styling.
Steps to reproduce
- Enable conversation retention (By providing same conversation token in the same window after refresh).
- Enter few message to bot.
- Refresh the page and continue the conversation.
- Observe how the user messages are rendering. (It should be right aligned, but it'll render as left aligned)
- Enter more message.
- Refresh the page and observe. (First set of messages are left aligned including user messages. The users messages entered after first refresh are rendered properly - right aligned)
Expected behavior
User messages should appear as right aligned and bot messages should be left aligned.
Additional context
The user messages should be rendered with webchat__bubble--from-user class.
[Bug]