slack-go / slack

Slack API in Go, originally by @nlopes; Maintainers needed, contact @parsley42
https://pkg.go.dev/github.com/slack-go/slack
BSD 2-Clause "Simplified" License
4.7k stars 1.14k forks source link

[socketmode] EventsAPI is called multiple times for a single event #1345

Open rustycl0ck opened 3 weeks ago

rustycl0ck commented 3 weeks ago

What happened

The app-mention event (this function) is triggered multiple times sometimes. I have observed it being triggered upto a total of 4 times maximum. Many times just 2-3 times too.

Expected behavior

It should be triggered just once per mention/message.

Steps to reproduce

Run the example and then wait for some time after mentioning the bot. The Yes, hello (from here) message is posted after a few seconds or minutes again.

reproducible code

https://github.com/slack-go/slack/blob/00d0e9a995c975504c6db72b35c9da491e493ae2/examples/socketmode_handler/socketmode_handler.go

manifest.yaml

Versions