Skip to content

Conversation

@nt-7
Copy link

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

Summary

This docs should be fixed as well as the following change.

[Original docs] microsoft / BotFramework-WebChat - Fix obsolete Web Chat API of Avatar #3553
microsoft/BotFramework-WebChat#3553

Description

botAvatarInitials and userAvatarInitials on How to use is obsolete API now.

There is no longer the two parameters on Web Chat API Reference.

So, it doesn't work.

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 docs.

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 it's obsolete now.
It is appropriate to set them in styleOptions now.

This docs is reflected the following change.

microsoft / BotFramework-WebChat - Fix obsolete Web Chat API of Avatar #3553
microsoft/BotFramework-WebChat#3553
@mmiele mmiele self-assigned this Dec 22, 2020
@mmiele mmiele added the status: writing Work in progress label Dec 22, 2020
@mmiele
Copy link

mmiele commented Dec 28, 2020

The correct article will be available in the next documentation update.

@mmiele mmiele closed this Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: writing Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants