-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
base: develop
Are you sure you want to change the base?
Conversation
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
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.16% -0.01%
===========================================
Files 3005 3005
Lines 71387 71389 +2
Branches 16342 16343 +1
===========================================
- Hits 43669 43667 -2
- Misses 24750 24755 +5
+ Partials 2968 2967 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
ARCH-1582
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments
This pull request refactors the
toggleFavoriteRoom
function in the RocketChat/Rocket.Chat repository. The changes involve removing the dependency on the globalMeteor.userId()
by introducing an explicituserId
parameter. 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 whereuserId
is null. The updates are made in theapps/meteor/client/lib/mutationEffects/room.ts
andapps/meteor/client/views/room/hooks/useToggleFavoriteMutation.ts
files, ensuring better context handling by requiring the user ID as a parameter. The source branch for this refactor isrefactor/toggle-favorite
, targeting thedevelop
branch.