我正在使用此JSON响应传入的Slack斜杠命令(收据后不是POST):
{
"text": "Testing some interactions!",
"attachments": [{
"callback_id": "testing_interactions",
"attachment_type": "default",
"actions": [{
"name": "action",
"text": "Click Me",
"value": "clicked",
"style": "primary",
"type": "button"
}]
}]
}
这给了我一个漂亮,漂亮,绿色的按钮,在大多数情况下,一切似乎都很好。但是,根据the Slack documentation for Interactive Messages,我应该在交互有效负载中获得一个original_message
属性。
这不会发生,我只会得到带有有效负载的示例POST:
{
"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"
}
我希望能够使用original_message
属性在我的目标实现中提供批准/取消操作,但是无法这样做。
有两个问题:
original_message
时我想念什么?答案 0 :(得分:4)
您的互动消息是否短暂? From the docs:The original_message is not provided for ephemeral messages.