Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
): any {
return {
adaptiveCardsHostConfig: AdaptiveCardsHostConfig,
bot: {
id: botId || 'bot',
name: 'Bot'
},
botConnection: directLine,
formatOptions: {
showHeader: false
},
selectedActivity: selectedActivity$,
showShell: mode === 'livechat',
speechOptions:
(endpoint && endpoint.appId && endpoint.appPassword) ? {
speechRecognizer: new CognitiveServices.SpeechRecognizer({
fetchCallback: getSpeechToken.bind(null, endpoint, false),
fetchOnExpiryCallback: getSpeechToken.bind(null, endpoint, true)
}),
speechSynthesizer: new WebChat.Speech.BrowserSpeechSynthesizer()
} : null,
user: {
id: userId || 'default-user',
name: 'User'
}
};
}