Botframework-webchat: multiple calls to directline/conversations

Created on 18 Dec 2019  路  3Comments  路  Source: microsoft/BotFramework-WebChat

Screenshots

image

image


Version

CDN 4.7

Describe the bug

There are multple calls being made to directline/conversation

Steps to reproduce

`

   window.WebChat.renderWebChat(
  {

    userID: sessionStorage.getItem('email'),
    username: sessionStorage.getItem('username'),
    locale: 'en-GB',


    directLine: directLine,


    styleOptions,
    groupTimestamp,
    selectVoice: () => ({ voiceURI: 'Custom Voice' }),
    webSpeechPonyfillFactory: options => {
      var { SpeechGrammarList, SpeechRecognition } = speechToTextPonyfillFactory(options);
      var { speechSynthesis, SpeechSynthesisUtterance } = textToSpeechPonyfillFactory(options);
      return {
        SpeechGrammarList,
        SpeechRecognition,
        speechSynthesis,
        SpeechSynthesisUtterance
      };
    }
  },
  this.botWindowElement.nativeElement
);

`

Expected behavior

Ideally one call should be made

Additional context

We are using an angular app .

[Bug]

Bot Services Question customer-replied-to customer-reported

Most helpful comment

I believe this is correct behavior.

We have 2 modes in Direct Line: (short) polling and Web Socket.

Looks like you are connected via our polling mechanism, thus, there will be a poll call every second.

When you call createDirectLine, if you did not set webSocket: false explicitly, it should start as a Web Socket connection.

p.s. Direct Line does not support long polling.

All 3 comments

hi @prashanthsridhar - thanks for opening the issue. we'll do some investigation on our end and report back.

I believe this is correct behavior.

We have 2 modes in Direct Line: (short) polling and Web Socket.

Looks like you are connected via our polling mechanism, thus, there will be a poll call every second.

When you call createDirectLine, if you did not set webSocket: false explicitly, it should start as a Web Socket connection.

p.s. Direct Line does not support long polling.

@compulim , thank you for the quick response.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

corinagum picture corinagum  路  3Comments

AndreMantas picture AndreMantas  路  4Comments

marcasmar94 picture marcasmar94  路  3Comments

joshm998 picture joshm998  路  3Comments

felixhauserch picture felixhauserch  路  3Comments