페이지의 bot webchat 컨트롤에서 보낸 각 메시지와 함께 channelData를 주입하려고합니다. 주변을 둘러 보았고이 샘플 (https://cmsdk.com/javascript/how-to-send-custom-channel-data-when-using-web-chat-client-with-bot-framework.html)을 찾았습니다. 내 코드는 아래 코드와 같습니다.각 메시지와 함께 webchat에 channelChannel 보내기
문제는 Chrome에서 작동하지만 스프레드 연산자 (...)가 Edge 또는 IE에서 작동하지 않는다는 것입니다. 모든 브라우저에서 작동 할 수있는 대체 구문이 있습니까? 그것은 바벨 같다
var user = {
id: '@User.Identity.Name',
name: '@User.Identity.Name'
};
var bot = {
id: BotId,
name: 'BotName'
};
var botConnect = new BotChat.DirectLine({
secret: '@ViewData["BotSecret"]',
webSockets: 'true'
});
var v = { ...botConnect };
debugger;
BotChat.App({
botConnection: {
...botConnect,
postActivity: activity => {
activity.channelData = {
StudentId: '@User.Identity.Name'
};
return botConnect.postActivity(activity);
}
},
user: user,
bot: bot,
resize: 'detect'
}, document.getElementById("bot"));
에지 -table/es6/# test-spread _ (...) _ operator –
실험용 기능을 수동으로 활성화해야 최종 사용자가 그렇게하지 않아도된다고 생각합니다. IE에 대한 해결 방법이 없다고 생각합니다. – GaboG