This problem happens when the interactive callback is triggered, the program parses the payload of the incoming request. The error is located in slackevents.ParseActionEvent().
In slackevents.ParseActionEvent() function, it uses the struct slackevents.MessageAction as the target struct, which is only compitible with AttachmentAction, but BlockAction. Unfortunately, my payload includes BlockAction.
In order to take advantages of the workflow of verifying the token in slackevents.ParseActionEvent(), I will simply replace MessageAction with slack.InteractionCallback in this function to fix the error in my PullRequest.
This problem happens when the interactive callback is triggered, the program parses the payload of the incoming request. The error is located in
slackevents.ParseActionEvent()
.In
slackevents.ParseActionEvent()
function, it uses the structslackevents.MessageAction
as the target struct, which is only compitible with AttachmentAction, but BlockAction. Unfortunately, my payload includes BlockAction.AttachmentAction json sample:
The good thing is that the
InteractionCallback
struct has defined to compatible with both AttachmentAction and BlockAction.BlockAction json sample:
In order to take advantages of the workflow of verifying the token in
slackevents.ParseActionEvent()
, I will simply replaceMessageAction
withslack.InteractionCallback
in this function to fix the error in my PullRequest.