Skip to content

Conversation

@nt-7
Copy link
Contributor

@nt-7 nt-7 commented Oct 21, 2020

Description

I found botAvatarInitials and userAvatarInitials on README document.
However, it doesn't work.

Also, I found there is no longer the two parameters on Web Chat API Reference.

Meanwhile, it works correctly if I set botAvatarInitials and userAvatarInitials on styleOptions.

Specific Changes

I remove botAvatarInitials and userAvatarInitials from Web Chat API parameters on README document.

before

window.WebChat.renderWebChat(
        {
          directLine: window.WebChat.createDirectLine({
            token: 'YOUR_DIRECT_LINE_TOKEN'
          }),
          userID: 'YOUR_USER_ID',
          username: 'Web Chat User',
          locale: 'en-US',
          botAvatarInitials: 'WC',
          userAvatarInitials: 'WW'
        },
        document.getElementById('webchat')
      );

after

window.WebChat.renderWebChat(
        {
          directLine: window.WebChat.createDirectLine({
            token: 'YOUR_DIRECT_LINE_TOKEN'
          }),
          userID: 'YOUR_USER_ID',
          username: 'Web Chat User',
          locale: 'en-US'
        },
        document.getElementById('webchat')
      );

Previously it could be set in the Web Chat API Reference, but I'm guessing it's obsolete now.
I believe it is appropriate to set them in styleOptions now.

Copy link
Contributor

@corinagum corinagum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@corinagum corinagum merged commit 1cacf49 into microsoft:master Oct 21, 2020
nt-7 added a commit to nt-7/bot-docs that referenced this pull request Oct 22, 2020
This docs is reflected the following change.

microsoft / BotFramework-WebChat - Fix obsolete Web Chat API of Avatar #3553
microsoft/BotFramework-WebChat#3553
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants