问题描述
我在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 (将#修改为@)