【发布时间】:2021-10-19 00:33:00
【问题描述】:
我正在通过通道数据从网络聊天客户端向 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 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# 在服务器端访问这些数据?
【问题讨论】:
标签: c# botframework chatbot