【发布时间】:2020-01-30 13:05:24
【问题描述】:
我从我的机器人 (.NET SDK) 发送一个名为“locationRequest”的事件
Activity activity = new Activity
{
Type = ActivityTypes.Event,
Name = "locationRequest"
};
await stepContext.Context.SendActivityAsync(activity, cancellationToken);
我想在 WebChat 客户端应用程序中捕获此事件,基于 React 中编码的 minizable-web-chat,并将布尔 locationRequested 设置为 True:
const store = createStore({}, ({ dispatch }) => next => action => {
if (action.type === 'DIRECT_LINE/CONNECT_FULFILLED') {
dispatch({
type: 'WEB_CHAT/SEND_EVENT',
payload: {
name: 'webchat/join',
}
});
}
else if(action.name == 'locationRequest'){
this.setState(() => ({
locationRequested: true
}));
}
return next(action);
});
我无法赶上这个活动,请问有什么想法吗?
【问题讨论】:
标签: c# react-native botframework web-chat