我正在使用 Slack 的 views.open API 创建一个模式。我有 1 个频道选择器和 1 个用户选择器。每当我点击频道选择器时,它都会打开用户选择器,就像我点击它一样。我是在滥用 API 还是这是一个错误?以下是可用于在 Slack Block Kit Builder 中可视化模式的 JSON 代码
{
"type": "modal",
"title": {
"type": "plain_text",
"text": "Search",
"emoji": true
},
"submit": {
"type": "plain_text",
"text": "Search",
"emoji": true
},
"close": {
"type": "plain_text",
"text": "Cancel",
"emoji": true
},
"blocks": [
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Enter topics:"
},
"accessory": {
"type": "multi_static_select",
"placeholder": {
"type": "plain_text",
"text": "topic",
"emoji": true
},
"options": [
{
"text": {
"type": "plain_text",
"text": "Choice 1",
"emoji": true
},
"value": "value-0"
},
{
"text": {
"type": "plain_text",
"text": "Choice 2",
"emoji": true
},
"value": "value-1"
},
{
"text": {
"type": "plain_text",
"text": "Choice 3",
"emoji": true
},
"value": "value-2"
}
]
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "Entering multiple topics will filter snippets containing all of them"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Only show results from following user"
},
"accessory": {
"type": "static_select",
"placeholder": {
"type": "plain_text",
"text": "Choose a user",
"emoji": true
},
"options": [
{
"text": {
"type": "plain_text",
"text": "Choice 1",
"emoji": true
},
"value": "value-0"
},
{
"text": {
"type": "plain_text",
"text": "Choice 2",
"emoji": true
},
"value": "value-1"
},
{
"text": {
"type": "plain_text",
"text": "Choice 3",
"emoji": true
},
"value": "value-2"
}
]
}
},
{
"type": "section",
"text": {
"type": "plain_text",
"text": "or",
"emoji": true
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Only show results from following channel"
},
"accessory": {
"type": "static_select",
"placeholder": {
"type": "plain_text",
"text": "Choose a channel",
"emoji": true
},
"options": [
{
"text": {
"type": "plain_text",
"text": "Choice 1",
"emoji": true
},
"value": "value-0"
},
{
"text": {
"type": "plain_text",
"text": "Choice 2",
"emoji": true
},
"value": "value-1"
},
{
"text": {
"type": "plain_text",
"text": "Choice 3",
"emoji": true
},
"value": "value-2"
}
]
}
}
]
}