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

feat: de-duplicate queued messages for not-yet-open channel #6

Merged
merged 3 commits into from
Feb 17, 2025

Conversation

mackenzie-grimes-noaa
Copy link
Contributor

@mackenzie-grimes-noaa mackenzie-grimes-noaa commented Feb 17, 2025

Checklist

  • Version number incremented in package.json
  • Unit tests are passing

Changes

  • For queued messages that are waiting for a MUPPET channel to open, de-duplicate messages (on destination and eventClass), only saving the most recent message

Explanation

This protects receiving channels (apps) from jittery behavior when they do come online and connect via MUPPET/WebRTC.

E.g. if a sender fires multiple messages with eventClass: 'SENDER_APP.USER_SELECTED' before a receiving app is online, the receiver would previously attempt to process all these messages, which could lead to a jumpy user experience/UI state. Now only the most recent message will take effect in the receiver.

@mackenzie-grimes-noaa mackenzie-grimes-noaa merged commit 226d76a into main Feb 17, 2025
1 check passed
@mackenzie-grimes-noaa mackenzie-grimes-noaa deleted the feat/dedupe-queued-messages branch February 17, 2025 21:27
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.

1 participant