Skip to content

Conversation

@julio-rocketchat
Copy link
Member

@julio-rocketchat julio-rocketchat commented Feb 6, 2025

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 our sendGCM 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

@julio-rocketchat julio-rocketchat requested a review from a team as a code owner February 6, 2025 17:43
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 6, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2025

🦋 Changeset detected

Latest commit: 6c34599

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 35 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/api-client Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/ddp-client Patch
@rocket.chat/freeswitch Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/models Patch
@rocket.chat/network-broker Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/ui-voip Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

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
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.45%. Comparing base (bb33016) to head (6c34599).
Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           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           

});
await this.add('Push_gcm_api_key', '', {
type: 'string',
hidden: true,
Copy link
Member

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:

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.

Copy link
Member Author

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

Copy link
Contributor

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)

Copy link
Member Author

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

Gustrb
Gustrb previously approved these changes Feb 10, 2025
@julio-rocketchat julio-rocketchat added this to the 7.4.0 milestone Feb 11, 2025
sampaiodiego
sampaiodiego previously approved these changes Feb 19, 2025
@julio-rocketchat julio-rocketchat added the stat: QA assured Means it has been tested and approved by a company insider label Feb 19, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Feb 19, 2025
@kodiakhq kodiakhq bot removed the stat: ready to merge PR tested and approved waiting for merge label Feb 19, 2025
@kodiakhq
Copy link
Contributor

kodiakhq bot commented Feb 19, 2025

This PR currently has a merge conflict. Please resolve this and then re-add the ['stat: ready to merge', 'automerge'] label.

@julio-rocketchat julio-rocketchat added the stat: ready to merge PR tested and approved waiting for merge label Feb 19, 2025
@julio-rocketchat julio-rocketchat merged commit dc8e8b9 into develop Feb 19, 2025
47 of 48 checks passed
@julio-rocketchat julio-rocketchat deleted the remove-node-gcm-due-to-deprecation branch February 19, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants