-
Notifications
You must be signed in to change notification settings - Fork 13k
refactor: remove Meteor from toggleFavoriteRoom
#35851
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #35851 +/- ##
===========================================
+ Coverage 61.17% 61.21% +0.04%
===========================================
Files 3161 3007 -154
Lines 74702 71419 -3283
Branches 16678 16334 -344
===========================================
- Hits 45700 43721 -1979
+ Misses 25902 24732 -1170
+ Partials 3100 2966 -134
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
ARCH-1582
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
This pull request refactors the
toggleFavoriteRoomfunction in the RocketChat/Rocket.Chat repository. The changes involve removing the dependency on the globalMeteor.userId()by introducing an explicituserIdparameter. This modification enhances the function's testability and flexibility by decoupling it from the global state. Additionally, a guard clause is added to handle scenarios whereuserIdis null. The updates are made in theapps/meteor/client/lib/mutationEffects/room.tsandapps/meteor/client/views/room/hooks/useToggleFavoriteMutation.tsfiles, ensuring better context handling by requiring the user ID as a parameter. The source branch for this refactor isrefactor/toggle-favorite, targeting thedevelopbranch.