Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This adds Custom Payload support for Push Notifications
- Fixed processing of apns payloads
- Rules - Allowed Payloads to be sent, this can probably be moved to the admin ui as well (Uses options_element if it's enabled)
- Some code refactoring since s lot of the functions for payloads/sending messages were very similar and I needed some custom payloads-
- Optimizations for loading tokens (Just loaded them all at once instead of per use)
Still to do:
- Allow Custom Payloads to be Sent in UI (Copy the code from the Rules UI to the other admin page)
- More Testing with iOS / Android (I'll be doing this over the few weeks)
- Hooks could be improved - right now I didn't add any but the current hook only hooks on the message and not the payload
Comment | File | Size | Author |
---|---|---|---|
#3 | push_notifications.rules_.inc_.patch | 3.32 KB | iadegesso |
#3 | push_notifications.module.patch | 8.25 KB | iadegesso |
push_notifications-push_payloads-1658132.diff | 11.45 KB | Derimagia |
Comments
Comment #2
iadegesso CreditAttribution: iadegesso commentedHi,
do you think this patch should be useful to "fix" my request (https://www.drupal.org/node/2655492)?
Thank you in advance
Iade Gesso (MSc & PhD in Computer Science)
Comment #3
iadegesso CreditAttribution: iadegesso commentedOk, I tested it myself... and I found that your patch partially meets my needs. But, I found that sending bulk notifications via Rules was not able to manage custom payload... so, I started to modify the already patched code, but using the currently stable release of the module (7.x-1.2), and I got a solution that fully meets my needs.
I will attach my patch set to this post (it already includes the original patch)... hope, it will be merged in the master branch with your code! :)
Iade
Comment #4
tyler.frankenstein CreditAttribution: tyler.frankenstein commented