Slack bot - registering to a message-event not getting triggered

836 Views Asked by At

We created a Slack app using Bolt and Javascript. We wanted to listen to messages coming from the Slack app. We went to the api.slack.com and added message.app_home event

enter image description here

According to the documentation we should add an event to the Bot for message and check if the the event.type is app_home

We did it as follow:

enter image description here

We add a new message in the Slack app:

enter image description here

The listener function just logs the message, but it never gets called:

enter image description here

Is it something with the Bolt or I am not implementing it correctly?

1

There are 1 best solutions below

0
On

We figured it out.

We had to add message.im event to the ‘Subscribe to bot events’ section. The message.app_home is deprecated and won’t work for new apps created after 2021.