parse-server
parse-server copied to clipboard
feat: add client socket ID to LiveQuery `ws_disconnect`, `ws_connect` , `connect` and `subscribe` event
New Pull Request Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am creating this PR in reference to an issue.
Issue Description
In order to create a Online/offline functionality with ParseLiveQuery socket protocol, i'd like to add client's socket Id to 'ws_disconnect' event, in order to know which socket is disconnecting.
Approach
Just add existing client ID, to ws_disconnect Object.
TODOs before merging
- [x] Add changes to documentation (guides, repository pages, in-code descriptions)
- [x] A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)
This is my first ever contribution on Github, so sorry if not totally well done.
Thanks for opening this pull request!
- ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as
Related issue: #123in the PR description, so I can recognize it.
Codecov Report
Merging #7999 (20445b8) into alpha (b10182f) will increase coverage by
0.00%. The diff coverage isn/a.
:exclamation: Current head 20445b8 differs from pull request most recent head deeff1f. Consider uploading reports for the commit deeff1f to get more accurate results
@@ Coverage Diff @@
## alpha #7999 +/- ##
=======================================
Coverage 94.11% 94.11%
=======================================
Files 182 182
Lines 13621 13621
=======================================
+ Hits 12819 12820 +1
+ Misses 802 801 -1
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/LiveQuery/ParseLiveQueryServer.js | 95.48% <ø> (ø) |
|
| src/RestWrite.js | 94.46% <0.00%> (+0.15%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update b10182f...deeff1f. Read the comment docs.
@krtooch thanks for the PR, let us know when this is ready for review.
ok for review.
Hello i added clientId, to ws_connect , connect and subscribe, and add some test to check req.
@krtooch Could you address any open review comments, so we can merge this?