How to get Activity Info from an IDialogContext

寵の児 提交于 2019-12-18 16:32:19

问题


I'm using a LuisDialog and all I get the the callback returns is an IDialogContext and the LuisResult. Is there a way I can get info from the original Activity, like channel, from name, et al?


回答1:


Since the v3.2.0 release you can access the original incoming message from the intent handlers. Check here to understand how your intent handler should looks like.

public async Task MyHandler(IDialogContext context, IAwaitable<IMessageActivity> activity, LuisResult result)

Alternatively, you can use context.MakeMessage but I would recommend updating your intent handlers.



来源:https://stackoverflow.com/questions/39374494/how-to-get-activity-info-from-an-idialogcontext

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!