Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push Matrix->Slack messages through the same queue as Slack->Matrix #790

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tadzik
Copy link
Contributor

@tadzik tadzik commented Jul 4, 2024

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.

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.
@tadzik tadzik marked this pull request as ready for review July 4, 2024 13:58
@tadzik tadzik requested a review from a team as a code owner July 4, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slack integration with matrix is posting double messages
1 participant