File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -201,10 +201,17 @@ export default class PushNew extends DashboardView {
201
201
if ( changes . increment_badge ) {
202
202
payload . badge = "Increment" ;
203
203
}
204
- Parse . Push . send ( {
204
+
205
+ let body = {
205
206
where : changes . target || new Parse . Query ( Parse . Installation ) ,
206
- data : payload ,
207
- } , {
207
+ data : payload
208
+ }
209
+ let audience_id = changes . audience_id ;
210
+ // Only set the audience ID if it is a saved audience.
211
+ if ( audience_id != PushConstants . NEW_SEGMENT_ID && audience_id != "everyone" ) {
212
+ body . audience_id = audience_id ;
213
+ }
214
+ Parse . Push . send ( body , {
208
215
useMasterKey : true ,
209
216
} ) . then ( ( { error } ) => {
210
217
//navigate to push index page and clear cache once push store is created
You can’t perform that action at this time.
0 commit comments