Skip to content

Conversation retention : user messages are returned as Bot message #3952

@venkatx5

Description

@venkatx5

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

image
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

  1. Enable conversation retention (By providing same conversation token in the same window after refresh).
  2. Enter few message to bot.
  3. Refresh the page and continue the conversation.
  4. Observe how the user messages are rendering. (It should be right aligned, but it'll render as left aligned)
  5. Enter more message.
  6. 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]

Metadata

Metadata

Assignees

Labels

Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.bugIndicates an unexpected problem or an unintended behavior.customer-replied-toRequired for internal reporting. Do not delete.customer-reportedRequired for internal Azure reporting. Do not delete.supportInternal request for assistance from the Support Team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions