

CDN 4.7
There are multple calls being made to directline/conversation
`
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
);
`
Ideally one call should be made
We are using an angular app .
[Bug]
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.
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 setwebSocket: falseexplicitly, it should start as a Web Socket connection.p.s. Direct Line does not support long polling.