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

Clean up methods related to presence #594

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Clean up methods related to presence #594

merged 2 commits into from
Aug 3, 2023

Conversation

chacha912
Copy link
Contributor

What this PR does / why we need it:

  • Return presence to user by retrieving only online clients and making a copy
  • Trigger unwatched event instead of presence-changed event during detach

Which issue(s) this PR fixes:

Related yorkie-team/yorkie-js-sdk#599

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Additional documentation:


Checklist:

  • Added relevant tests or not required
  • Didn't break anything

@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #594 (27e541c) into main (036a991) will decrease coverage by 0.21%.
Report is 1 commits behind head on main.
The diff coverage is 3.70%.

@@            Coverage Diff             @@
##             main     #594      +/-   ##
==========================================
- Coverage   51.11%   50.90%   -0.21%     
==========================================
  Files          66       66              
  Lines        7008     6991      -17     
==========================================
- Hits         3582     3559      -23     
- Misses       2952     2962      +10     
+ Partials      474      470       -4     
Files Changed Coverage Δ
api/converter/to_bytes.go 64.07% <ø> (ø)
api/converter/to_pb.go 54.26% <ø> (-0.87%) ⬇️
client/client.go 13.48% <0.00%> (-0.18%) ⬇️
pkg/document/document.go 44.55% <0.00%> (+1.69%) ⬆️
pkg/document/internal_document.go 13.67% <0.00%> (-3.53%) ⬇️
server/rpc/admin_server.go 53.97% <0.00%> (ø)
server/backend/database/memory/database.go 53.13% <100.00%> (ø)
server/backend/database/mongo/client.go 39.41% <100.00%> (ø)

... and 3 files with indirect coverage changes

Copy link
Member

@hackerwins hackerwins left a comment

Choose a reason for hiding this comment

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

Overall looks good. I left a minor question.

pkg/document/internal_document.go Show resolved Hide resolved
@hackerwins hackerwins merged commit 01b9ad9 into main Aug 3, 2023
1 check passed
@hackerwins hackerwins deleted the unwatch-event branch August 3, 2023 08:09
Wu22e pushed a commit to Wu22e/yorkie that referenced this pull request Sep 3, 2023
* Return presence to user by retrieving only online clients and making a copy

* Trigger unwatched event instead of presence-changed event during detach
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.

2 participants