java-slack-sdk icon indicating copy to clipboard operation
java-slack-sdk copied to clipboard

Action button confirmation should have property name "confirm" instead of "confirmation"

Open vdobrikov opened this issue 9 years ago • 1 comments

Current implementation of button with confirmation doesn't show the actual confirmation since uses incorrect attribute name: Current version:

{
    "name": "game",
    "text": "Thermonuclear War",
    "style": "danger",
    "type": "button",
    "value": "war",
        "confirmation": {
            "title": "Are you sure?",
            "text": "Wouldn't you prefer a good game of chess?",
            "ok_text": "Yes",
            "dismiss_text": "No"
    }
}

Correct version:

{
    "name": "game",
    "text": "Thermonuclear War",
    "style": "danger",
    "type": "button",
    "value": "war",
        "confirm": {
            "title": "Are you sure?",
            "text": "Wouldn't you prefer a good game of chess?",
            "ok_text": "Yes",
            "dismiss_text": "No"
    }
}

Problem is here: https://github.com/seratch/jslack/blob/e633154c85c2a1a5b358b41185a5c663559dd71b/src/main/java/com/github/seratch/jslack/api/model/Action.java#L45

vdobrikov avatar Nov 29 '17 11:11 vdobrikov

Thanks.

seratch avatar Nov 30 '17 22:11 seratch