voiio / Sam

Sam – cuz your company is nothing without Sam
https://code.voiio.de/Sam/
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

🐛 Race condition between message submission and runs #11

Closed codingjoe closed 9 months ago

codingjoe commented 9 months ago

Error description

The order of events is not fixed, and slow message processing can result in the message not being added to a thread after the run as harded.

How to reproduce

You can add a voice message to a channel and @-mention Sam.

Technical Notes

The processing of a mention, needs to hold until the message has been processed. A lock, based on the message Slack message ID would resolve this issue. Redis, which we already use implements a lock.