微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Microsoft团队:Bot,任务模块,replyToId

如何解决Microsoft团队:Bot,任务模块,replyToId

我在Microsoft Teams中拥有一个机器人,该机器人正在使用REST API进行管理。我发送带有以下调用操作的卡:

{
  type: "Action.Submit",title: "Run task",data: {
    msteams: {
      type: "invoke",value: JSON.stringify({"key1": "value","key1": "value"})
    }
  }
}

按钮正确呈现,并在单击时通过HTTP POST发送以下正文:

{ 
  name: 'task/fetch',type: 'invoke',timestamp: '2020-08-14T05:01:40.651Z',localTimestamp: '2020-08-14T01:01:40.651-04:00',id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',channelId: 'msteams',serviceUrl: 'https://smba.trafficmanager.net/amer/',from:
   { id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',name: 'Suchit Agarwal',aadobjectId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx' 
  },conversation: { 
    conversationType: 'personal',tenantId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx' 
  },recipient: { 
    id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',name: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx' 
  },entities: [{ 
    locale: 'en-US',country: 'US',platform: 'Mac',type: 'clientInfo' 
  }],channelData: { 
    tenant: { id: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx' },source: { name: 'compose' } 
  },value: { 
    data: { 
      requestId: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',taskUUID: 'xxxxxxxxxxxxxxxxxxxxxxxxxxx',type: 'task/fetch',viewType: 'run_task' 
    },context: { theme: 'default' } 
  },locale: 'en-US' 
}

但是,请注意,收到的消息缺少replyToId。如何将其返回服务器,以便更新卡操作来自的消息,如此处所述:https://docs.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-actions#example-incoming-invoke-message

感谢您的帮助。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。