问题描述
我有一个服务可以触发具有 autoInvokeAction
的 Actionable 消息(比如 card1)。当用户打开电子邮件时,会触发 autoInvokeAction
API 并更新卡片以反映更新的数据。但是在更新的卡片(比如 card2)中,Action.Http 按钮不会被呈现,hideOriginalBody
属性也被忽略,原始 HTML 正文与更新的卡片一起显示。
当我尝试查看电子邮件的来源时,我们可以看到 HTML 电子邮件具有按钮的所有标记。但卡片不呈现 Action.Http
操作。尝试在身体外部使用 actions[]
并在身体内部使用 ActionSet
。但仍然没有运气。甚至 ActionableMessagesDebugger 也没有显示任何错误,也没有显示 Action.Htpp
操作。
这是自适应卡片。
{
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json","type": "AdaptiveCard","originator": "xxxxx","version": "1.0","hideOriginalBody": "true","body": [
{
"type": "Container","style": "emphasis","items": [
{
"type": "ColumnSet","columns": [
{
"type": "Column","items": [
{
"type": "TextBlock","size": "large","text": "ACTION PENDING","weight": "bolder"
}
],"width": "stretch"
}
]
}
]
},{
"type": "Container","items": [
{
"type": "TextBlock","text": "${reqName}","wrap": true,"weight": "bolder","horizontalAlignment": "Center"
},{
"type": "FactSet","facts": [
{
"title": "Request ID","value": "${requestID}"
},{
"title": "Requested ID 2","value": "${requestID2}"
},{
"title": "Requested ID 3","value": "${requestID3}"
}
]
}
]
},{
"type":"ActionSet","actions":[
{
"type": "Action.ShowCard","title": "View More Info","card": {
"type": "AdaptiveCard","body": [
{
"type": "Container","items": [
{
"type": "FactSet","facts": [
{
"$data": "${moreData}","title": "${key}","value": ":${value}"
}
]
}
]
}
]
}
},{
"type": "Action.Http","title": "Approve","method": "POST","url": "https://example.com/api/action","body": "{\"action\": \"approveAction\",\"id\": \"${requestID}\",\"originator\": \"xxxx\"}"
},{
"type": "Action.ShowCard","title": "Reject","body": [
{
"type": "Input.Text","id": "comment","placeholder": "Add a reason for rejecting the request","isMultiline": true
}
],"actions": [
{
"type": "Action.Http","title": "Submit","body": "{\"action\": \"rejectAction\",\"comment\":\"{{comment.value}}\",\"originator\": \"xxxxx\"}"
}
]
}
}
]
}
],"autoInvokeAction": {
"method": "POST","body": "{\"action\": \"autoRefresh\",\"originator\": \"xxxxx\"}","type": "Action.Http"
}
}
有没有人遇到过类似的问题并且知道如何解决这个问题?
编辑:仅当我们使用自适应卡片模板绑定数据时才会出现问题。在 Outlook Actionable Messages 中使用模板有什么限制吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)