-
Notifications
You must be signed in to change notification settings - Fork 11.4k
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
chore: remove node-gcm
library and features due to deprecation
#35143
chore: remove node-gcm
library and features due to deprecation
#35143
Conversation
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 6c34599 The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #35143 +/- ##
========================================
Coverage 59.45% 59.45%
========================================
Files 2828 2828
Lines 68159 68159
Branches 15124 15124
========================================
Hits 40521 40521
Misses 24982 24982
Partials 2656 2656 |
@@ -109,6 +110,7 @@ export const createPushSettings = () => | |||
}); | |||
await this.add('Push_gcm_api_key', '', { | |||
type: 'string', | |||
hidden: true, |
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.
both this setting and Push_gcm_project_number
are still being used at:
Rocket.Chat/apps/meteor/server/lib/pushConfig.ts
Lines 99 to 102 in 4915806
gcm = { | |
apiKey: settings.get('Push_gcm_api_key'), | |
projectNumber: settings.get('Push_gcm_project_number'), | |
}; |
I suppose that part of the code should be refactored since this will be always empty from now on.
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.
@Gustrb seems like we're no longer using this part of the code since we don't use these settings. Should the gcm
config be removed? Would like your insight on this one since you worked on the push notifications before
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.
Hey, it looks like they are not being used and could be removed, but since we check for the key's existence to see if we should call fcm or apn, I think we could keep it here (maybe empty object?) and we can remove it later on a larger refactoring.
I think this code can be improved by a lot, but I don't think we should be doing it in this PR (since it is a chore and it is supposed to just remove the dependency)
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.
Added a TODO comment and removed settings.get
, but feel free to suggest a different way of doing it. @sampaiodiego @Gustrb
This PR currently has a merge conflict. Please resolve this and then re-add the |
Proposed changes (including videos or screenshots)
The
node-gcm
(https://www.npmjs.com/package/node-gcm) library has been deprecated since Google themselves deprecated their legacy GCM API. The API and the library are no longer working since June 2024 - which makes oursendGCM
method no longer work.We already had a replacement created by @Gustrb using the newer API wrapped in the
sendFCM
method. This PR simply removes the deprecated functionalities.Issue(s)
https://rocketchat.atlassian.net/browse/VLN-101
Steps to test or reproduce
N/A
Further comments
N/A