从机器人的自适应卡深度链接到团队中的选项卡

deep linking to tab in teams from adaptive card from bot

鉴于我们有一个团队机器人和个人团队选项卡(名称为 TT 和内容 URL:a.example.com/g)。

考虑一个场景,Bot 发送了一个带有 openUrl 按钮的自适应卡片(url 是 a.example.com/b/c?d=f)。单击此按钮后,通常会在新浏览器选项卡中打开 url a.example.com/b/c?d=f

由于上面的 URL 可以在团队选项卡 TT 中打开,我打算深入链接到选项卡并在选项卡中打开 url。

将 openUrl 按钮的 url 用作 https://teams.microsoft.com/l/entity/<appId>/<entityId>(引用自 Generate a deep link to your tab),我能够实现重定向到预期的团队选项卡 TT。但这并不能解决我的全部问题,因为我应该在选项卡中打开 a.example.com/b/c?d=f,而不是其默认内容 URL.

如何实现从聊天选项卡重定向到个人团队选项卡并自动打开选项卡中的 url a.example.com/b/c?d=f

我认为您可以为此在深层链接中正确使用 subEntityId。将要传递给选项卡的 url 的 URL 编码值,然后从选项卡中对其进行解码(您链接的文档中有一个部分是关于通过上下文对象:https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/deep-links#consume-a-deep-link-from-a-tab)