Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

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

Open
tadzik wants to merge 1 commit intodevelopfrom
tadzik/fifo-bridging
Open

Push Matrix->Slack messages through the same queue as Slack->Matrix#790
tadzik wants to merge 1 commit intodevelopfrom
tadzik/fifo-bridging

Conversation

@tadzik
Copy link
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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