Needs review
Project:
Push Notifications
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2017 at 09:36 UTC
Updated:
20 Feb 2017 at 15:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Xilis commentedComment #3
Xilis commentedComment #4
Xilis commentedComment #5
Xilis commentedFor testing data payloads, you can use something like:
Comment #6
jacob.embree commentedI recommend adding
$form['token']topush_notifications_mass_push_form().Either way, you should reroll the patch using git so that there aren't so many levels to the file paths. Right now -p6 is needed. git's default is -p1.
Form constructors (such as
push_notifications_single_push_form()) should take$formand$form_stateas parameters.Comment #7
jacob.embree commentedComment #8
Xilis commentedOops, my bad about the paths!
As for the form parameters, I copied it over from
push_notifications_mass_push_form($form_state).Using your patch, one cannot send a notification to a token which is not in the DB. Sometimes you just need to quickly check something/test out a new functionality of your mobile apps, and it's much easier to just copy the token over from a production/staging environment, than going through the whole process of connecting a phone to a local env, registering the token to a user and so on (which was the reason for the form in the first place).
Definitely agree on just adding an element to the mass_push_form through, so will work on a patch that meets halfway!
The following patch fixes the paths and adds another permission for accessing the single push page.
Comment #9
alesr commentedIdeally push notification sending should be managed from the tokens list where you should be able to select devices or users on the table (with chechboxes) and send a custom message to those devices/users only.
The addition of "external" device tokes as recipients is good. It could serve as a text field/text area on the same page but should require an additional permission.
It would be good to get an input from @haagendazs on this. It is definitely required, we just need to get on the same page with it before we deviate with patches.