Уценка не интерпретируется в тексте кнопки подтверждения сообщения Slack. - PullRequest
0 голосов
/ 16 апреля 2020

В блоках сообщений Slack, при добавлении кнопки, текст диалога подтверждения должен поддерживать уценку.

https://api.slack.com/reference/block-kit/composition-objects#text

Но он просто отображает простой текст :

{
    "blocks": [
        {
            "type": "section",
            "accessory": {
                "type": "button",
                "text": {
                    "type": "plain_text",
                    "text": "Validate"
                },
                "confirm":{
                    "title": {
                        "type": "plain_text",
                        "text": "Details"
                    },
                    "text": {
                        "type": "mrkdwn",
                        "text": "*bold* ?"
                    },
                    "confirm": {
                        "type": "plain_text",
                        "text": "Ok"
                    }
                }
            },
            "text": {
                "type": "mrkdwn",
                "text": "Hello World!"
            }
        }
    ]
}

button confirmation not interpreting markdown

1 Ответ

0 голосов
/ 23 апреля 2020

это похоже на работу

{
"type": "modal",
"title": {
    "type": "plain_text",
    "text": "My App",
    "emoji": true
},
"submit": {
    "type": "plain_text",
    "text": "Submit",
    "emoji": true
},
"close": {
    "type": "plain_text",
    "text": "Cancel",
    "emoji": true
},
"blocks": [
    {
        "type": "section",
        "text": {
            "type": "mrkdwn",
            "text": "This is a mrkdwn section block :ghost: *this is bold*, and ~this is crossed out~, and <https://google.com|this is a link>"
        }
    }
]

}

...