I am responding to an incoming Slack slash command with this JSON (not a POST after receipt):
{
"text": "Testing some interactions!",
"attachments": [{
"callback_id": "testing_interactions",
"attachment_type": "default",
"actions": [{
"name": "action",
"text": "Click Me",
"value": "clicked",
"style": "primary",
"type": "button"
}]
}]
}
That gives me a nice, pretty, green button to click on and everything seems just fine for the most part; however, according to the Slack documentation for Interactive Messages, I should be getting an original_message
property in the interaction payload.
This does not occur and I only get a sample POST with a payload like this:
{
"type": "interactive_message",
"actions": [
{
"name": "action",
"type": "button",
"value": "clicked"
}
],
"callback_id": "testing_interactions",
"team": {
"id": "TEAMID",
"domain": "mydomain"
},
"channel": {
"id": "CHANNELID",
"name": "directmessage"
},
"user": {
"id": "USERID",
"name": "me"
},
"action_ts": "123456",
"message_ts": "123456",
"attachment_id": "1",
"token": "my_token",
"is_app_unfurl": false,
"response_url": "https://hooks.slack.com/actions/...",
"trigger_id": "some.id"
}
I was hoping to be able to the original_message
property to be able to provide an approve/cancel operation in my target implementation but am unable to.
So two questions:
original_message
posted back to me on interaction?Is your interactive message ephemeral by any chance? From the docs: The original_message is not provided for ephemeral messages.