Skip to content

Conversation

@7ttp
Copy link
Contributor

@7ttp 7ttp commented Jan 2, 2026

when subscribing to multiple tables, events could be dispatched to the wrong callback. adds table validation to ensure payloads only reach their intended subscription.

closes #1721

@7ttp 7ttp requested review from a team as code owners January 2, 2026 18:59
@mandarini
Copy link
Contributor

@7ttp thank you for this PR! I like this fix. Before I merge it can we please add a test case that reproduces the bug by sending ids: ['conv-id', 'msg-id'] with data.table: 'messages' and verifying only the messages callback fires? Thanks again!

Copy link
Contributor

@mandarini mandarini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested test case

@7ttp
Copy link
Contributor Author

7ttp commented Jan 7, 2026

Added test to verify only the matching table's callback fires when multiple postgres_changes bindings share the same ids array.

@7ttp 7ttp requested a review from mandarini January 7, 2026 12:06
@mandarini mandarini merged commit d2cdf7f into supabase:master Jan 7, 2026
27 checks passed
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.

Incorrect handling of real-time events between updates from different tables

2 participants