Я отправляю данные из клиента веб-чата на Бота через данные канала следующим образом:
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);
});
https://github.com/microsoft/BotFramework-WebChat/blob/master/samples/04.api/b.piggy-back-on-outgoing-activities/index.html
Как получить доступ к этим данным на стороне сервера, используя C#?