Hello – I am posting this here in the hopes that someone has already faced this issue. Its seems pretty basic but I was not able to find the solution in the documentation, GitHub or even Google. Thanks in advance.
Description
I am using Rocket.Chat and I can send messages to my room through the REST API endpoint
http://localhost:3000/api/v1/chat.sendMessage
The message is sent to my board allright, and I am sending a button element in it, using this payload:
{
"message": {
"rid": "WAgEFZBAYqrjMvY5f",
"blocks": [
{
"type": "section",
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "CLICK ME"
},
"actionId": "action_1",
"style": "danger"
}
}
]
}
}
In my custom app, I am setting a executeBlockActionHandler method in the main ts file, but whenever I click on the button sent in the message, I receive the following message in my terminal:
rocketchat | App true triggered an interaction but it doen't exist or doesn't have method executeBlockActionHandler
How can I get this click on my message button? Do I have to register it somehow? I couldn’t find anything in the documentation so far, since it seems that all examples deal with buttons added through the app itself, not the RESP API message.
Server Setup Information
- Version of Rocket.Chat Server: 6.0.0
- Operating System: Linux PopOS
- Deployment Method: docker
- Number of Running Instances: 1
- NodeJS Version: 16.17.0
- MongoDB Version: 6.0.4