C# 如何用C语言提取通道数据#
我正在通过通道数据将数据从web聊天客户端发送到Bot,方法如下:C# 如何用C语言提取通道数据#,c#,botframework,chatbot,C#,Botframework,Chatbot,我正在通过通道数据将数据从web聊天客户端发送到Bot,方法如下: const store = window.WebChat.createStore({}, ({ dispatch }) => next => action => { if (action.type === 'DIRECT_LINE/POST_ACTIVITY') { // The channelData submitted here is very similar to HTTP cookies an
const store = window.WebChat.createStore({}, ({ dispatch }) => next => action => {
if (action.type === 'DIRECT_LINE/POST_ACTIVITY') {
// The channelData submitted here is very similar to HTTP cookies and vulnerable to forgery attack.
// Make sure you use signature to protect it and verify the signature on the bot side.
// To minimize unexpected behaviors, we recommend to treat the "action" object as if it is immutable.
// We use simple-update-in package to update "action" with partial deep cloning.
action = window.simpleUpdateIn(
action,
['payload', 'activity', 'channelData', 'myCustomProperty'],
() => 'Custom value'
);
}
return next(action);
});
如何使用C#?在服务器端访问此数据您可以在下面的上下文对象完整路径下的channelData下访问它
dialogContext.Context.Activity.ChannelData