-
Notifications
You must be signed in to change notification settings - Fork 93
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
Clean up methods related to presence #599
Conversation
Codecov Report
@@ Coverage Diff @@
## main #599 +/- ##
==========================================
- Coverage 87.52% 87.15% -0.38%
==========================================
Files 81 81
Lines 7953 8048 +95
Branches 816 818 +2
==========================================
+ Hits 6961 7014 +53
- Misses 679 720 +41
- Partials 313 314 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
Dealing with asynchronous events used to be challenging, but it seems that presence
and document.subscribe
events are now stable.
However, there are still some non-deterministic behaviors in our test cases. We need to address them to be deterministic in the next tasks.
What this PR does / why we need it?
This is a follow-up task of #574
unwatched
eventAny background context you want to provide?
When detaching, there are two possible scenarios:
When UserA detaches, a change is made to remove the presence, and the watch stream is canceled.
If UserB receives the
unwatched
event first, UserB will remove UserA from onlineClients and trigger theunwatched
event.If UserB receives the
pushpull
response first, which includes a change to remove presence, UserB will trigger theunwatched
event beforehand while detaching since it involves unwatching.What are the relevant tickets?
Fixes #
Checklist