团队Invoke_Response被团队拒绝吗?
我有一个在独立服务器上运行的Teams应用程序,其中包含Azurebot设置,用于该应用程序上的消息扩展。我有一个类实施消息处理扩展团队施法者的班级,这一切似乎都在起作用。问题是当我来回应InvokerSponse时。我将其放入具有正确类型的活动中,我没有错误,但是团队似乎拒绝了该消息,因为它没有为我提供包含响应的帖子请求的ID。创建活动时我缺少一些东西吗?
async def handle(turn_context):
invoke_response = await message_handler.on_invoke_activity(turn_context)
# invoke_response is an instance of botbuilder.schema._models_py3.InvokeResponse
result = await turn_context.send_activity(Activity(type=ActivityTypes.invoke_response, value=invoke_response))
self.logger.info(result)
I have a teams app running on a standalone server with an AzureBot setup for message extensions on the app. I've got a class implementing message handling extending TeamsActivityHandler which all seems to be working. The issue is when I come to respond with an InvokeResponse. I place this into an activity with the right type, I get no errors but Teams seems to be rejecting the message as it doesn't give me an ID for the POST request containing the response. Is there something I'm missing when creating the Activity?
async def handle(turn_context):
invoke_response = await message_handler.on_invoke_activity(turn_context)
# invoke_response is an instance of botbuilder.schema._models_py3.InvokeResponse
result = await turn_context.send_activity(Activity(type=ActivityTypes.invoke_response, value=invoke_response))
self.logger.info(result)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我完全没有意识到,消息扩展遵循标准请求响应模型,而不是像机器人一样的请求模型。这是一个完整的工作示例,使用烧瓶-MS示例在这里:
I was totally unaware that message extensions followed a standard request response model rather than a request request model as the bot does. Here is a full working example using flask - ms example here :