Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Read the paramters for the new HTTP v1 API from the config - The new version of the library does not support notifying multiple devices at the same time. Instead, it supports notifying only one device at a time. The return value from the `notify` method is also just the notification ID and not the summary with the structure showing the number of successes, number of failures, and then the results. Addressed this by creating a backwards compat function that has largely the same interface as before - Renamed the arguments to match the new version - The new version does not support sending structured data, only a flat K-V array, so changed the structure of the message sent for visible notifications - The new version only supports strings in the K-V array, so changed the notID from an int to a string. Testing done: Running the following command with both `nrel-commute` and stage, saw visible notifications on both android and iOS ``` - ./e-mission-py.bash bin/push/push_to_users.py -a -t "Testing HTTP v1 API" "The legacy FCM APIs were shutdown starting July 22, 2024. Performance has been steadily degrading since then. This is testing the migration to the new API" ``` Silent push notifications generated a mixture of successful and unsuccessful results ``` ./e-mission-py.bash bin/push/silent_ios_push.py -d 3600 {'ios': {'success': 16, 'failure': 14, 'results': ....} ```
- Loading branch information