【发布时间】:2021-02-23 02:07:29
【问题描述】:
我正在使用传入 webhook 向 Microsoft Teams 频道发送消息。除了应该通过浏览器打开文件但根本没有打开文件的“打开日志”按钮之外,这工作得很好。
JSON
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "0076D7",
"summary": "Error Log",
"sections": [{
"activityTitle": "Error in integration " + integration_name,
"activitySubtitle": "live stage",
"markdown": True,
"text": message
}],
"potentialAction": [{
"@type": "ActionCard",
"name": "Open log",
"actions": [{
"@type": "OpenUri",
"name": "Open log",
"targets": [{
"os": "default",
"uri": "file://someserver/d$/somefolder/logs/" + logname
}]
}]
}]
}
此 webhook 调用的结果如下所示: Message via webhook
我的问题是,这个按钮完全没有任何作用。如果我使用标准网站,甚至是 android/iOS URL,它会像预期的那样工作。
非常感谢任何解决此问题的帮助!难道我做错了什么? Microsoft Teams 是否会阻止 file:// 链接?
【问题讨论】:
标签: python json webhooks microsoft-teams