Microsoft Teams的Messaging Extension不显示用于搜索的多个参数列表

时间:2019-10-08 19:05:37

标签: botframework microsoft-teams

我正在尝试使用Teams消息传递扩展程序进行多个字段的搜索。根据{{​​3}},应该可以为“查询”类型的消息传递扩展指定多个参数。

  

对于基于搜索的消息传递扩展,将type参数设置为query。   以下是带有单个搜索命令的清单的示例。一种   单个消息传递扩展最多可以具有10个不同的命令   与之相关。这可以包括多个搜索和多个   基于动作的命令。

但是,据我所知,多个参数仅适用于操作类型,不适用于查询。我只看到一个用于搜索的文本框,而清单却指定了多个字段。

MS Teams docs

以下是清单的摘录。

"composeExtensions": [
        {
            "botId": "[omitted]",
            "canUpdateConfiguration": true,
            "commands": [
                {
                    "id": "search",
                    "type": "query",
                    "title": "search",
                    "description": "search",
                    "initialRun": false,
                    "fetchTask": false,
                    "context": [
                        "commandBox",
                        "compose",
                        "message"
                    ],
                    "parameters": [
                        {
                            "name": "hello",
                            "title": "hello",
                            "description": "hello",
                            "inputType": "text"
                        },
                        {
                            "name": "test",
                            "title": "test",
                            "description": "test",
                            "inputType": "text"
                        }
                    ]
                },
                {
                    "id": "addTodo",
                    "type": "action",
                    "title": "Create To Do",
                    "description": "Create a To Do item",
                    "initialRun": false,
                    "fetchTask": false,
                    "context": [
                        "commandBox",
                        "message",
                        "compose"
                    ],
                    "parameters": [
                        {
                            "name": "Name",
                            "title": "Title",
                            "description": "To Do Title",
                            "inputType": "text"
                        },
                        {
                            "name": "Description",
                            "title": "Description",
                            "description": "Description of the task",
                            "inputType": "textarea"
                        },
                        {
                            "name": "Date",
                            "title": "Date",
                            "description": "Due date for the task",
                            "inputType": "date"
                        }
                    ]
                }
            ]
        }
    ],

如果能做到,我将不胜感激。如果没有,还有其他选择吗?我的用例涉及用户进行私人搜索(即,与他们聊天的个人无法查看搜索结果/查询),然后从列表中选择合适的结果,然后通过聊天发送给另一个人。

谢谢。

1 个答案:

答案 0 :(得分:1)

您需要指定多个搜索命令,而不是多个参数(每个搜索命令一个参数)。还要注意,您实际上不能从消息中触发基于搜索的命令,因此您应该只为它们包括compose和commandBox范围。

您可以在Teams的GitHub应用中看到以下内容:

enter image description here

相关问题