Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: 31b1c1e The changes in this PR will be included in the next version bump. This PR includes changesets to release 32 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 #32208 +/- ##
===========================================
- Coverage 55.43% 54.85% -0.59%
===========================================
Files 2330 2276 -54
Lines 51376 50409 -967
Branches 10514 10271 -243
===========================================
- Hits 28479 27650 -829
+ Misses 20409 20288 -121
+ Partials 2488 2471 -17
Flags with carried forward coverage won't be shown. Click here to find out more. |
…engagementMDM * 'develop' of github.com:RocketChat/Rocket.Chat: chore: including x.com hostname to Twitter oembed (#32267) feat: node-gcm deprecation (#32208) chore: Deprecate mute/unmute meteor methods and convert to endpoint (#31811) fix: Wrong Business hours validations between different weeks (#32287) chore: Force logout live clients on E2EE keys reset changes (#32291) ci: skip update version message for TEST_MODE=true (#32293)
|
/patch |
|
/backport 6.7.3 |
|
Pull request #32448 added to Project: "Patch 6.7.3" |
|
/backport 6.6.8 |
|
Sorry, I couldn't do that backport because of conflicts. Could you please solve them? you can do so by running the following commands: after that just run |
|
/backport 6.6.8 |
|
Pull request #32449 added to Project: "Patch 6.6.8" |
|
/backport 6.5.7 |
1 similar comment
|
/backport 6.5.7 |
|
Sorry, I couldn't do that backport because of conflicts. Could you please solve them? you can do so by running the following commands: after that just run |
|
/backport 6.5.7 |
|
Pull request #32450 added to Project: "Patch 6.5.7" |
Proposed changes (including videos or screenshots)
Currently, we are using a library called node-gcm to send native notifications via firebase. Unfortunately Firebase is deprecating a series of libraries related to notifications (see https://firebase.google.com/support/faq?hl=pt-br#fcm-23-deprecation), and, because of this, the library we used to use is not going to be updated, mostly in favor of using the oficial firebase SDK.
We discussed about the use of the oficial package, but the oficial package bundles up every firebase feature inside a huge library, even though we just use a comically small subset of the features (sending notifications).
Therefore, we decided on not using the Firebase SDK and just using HTTP requests to send native notifications.
Backportability
This feature is tricky on this regard, because this API is going to stop working, so we need to add a feature flag (using a setting for it), because everyone who is using supported versions of Rocket.Chat need native notifications to work, so we add a flag called
Push_UseLegacy, if it is set to true, we will use the old api (usingnode-gcm), if it is false, it is going to use our HTTP wrapper on the notification service.Issue(s)
#32124
Steps to test or reproduce
First, it will be needed a way to connect a mobile device into the local server, you can choose whatever way you want, I am using a tunneling application called ngrok.
So, first I will start the application, on port 3000 (default) and then I will start ngrok there, you can do it like this:
After running the command, you will have a terminal interface, and you will see the URL the application is forwarding your local webserver, copy that value or save it somewhere, it will be needed later!
(it is a weird URL, something like: https://9d8c-191-243-134-83.ngrok-free.app)
So now, to test it you will need a test build of the application, please @ me on open, I can send you the build I am using 😎
Download the build and install it on your device.
Open the app, and it will ask you for the URL of the workspace, in this field, please, put the forwarded URL by ngrok.
Ok, so now, most of the config on the mobile side is done, now there are a few config's needed to enable the new notification provider:
1 - Go to settings>push
2 - Disable Push_UseLegacy
3 - Get the credentials JSON and paste it into Push_google_api_credentials
No we should be ready to go!
Just create a new user on your phone (don't have to, but it will be easier), and now, go on your workspace open in your computer, and ping the new user in the #general channel, you should get a notification on your phobe
Further comments
I've used https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages?hl=pt-br to type out the request type 😛
CONN-73