matrix-appservice-slack
matrix-appservice-slack copied to clipboard
Push Matrix->Slack messages through the same queue as Slack->Matrix
There is a possible race condition when a message gets sent from Matrix to Slack, and its echo arrives from Slack to Matrix before we got the response from Slack. We'd then check for its presence in recentSlackMessages before it actually gets added there, resulting in an undesirable echo and duplicate messages.
This adds Matrix->Slack sends to the same FIFO queue as we do for Slack->Matrix, which ensures that we would have added a message to recentSlackMessages before we start processing its echo.
Hopefully fixes GH-788.