@@ -259,7 +259,7 @@ public function sendNotificationToUserByEmail(
259
259
$ filters = [["field " => "email " , "value " => $ email ]];
260
260
}
261
261
262
- $ this ->sendNotificationToFiltersToSegment ($ message , $ filters , $ segment , $ url , $ data , $ buttons , $ schedule ,
262
+ return $ this ->sendNotificationToFiltersToSegment ($ message , $ filters , $ segment , $ url , $ data , $ buttons , $ schedule ,
263
263
$ smallIcon , $ LargeIcon , $ bigPicture , $ androidAccentCircleColor , $ androidAccentLedColor , $ sound );
264
264
}
265
265
@@ -327,7 +327,7 @@ public function sendNotificationToFiltersToSegment(
327
327
$ params ['android_sound ' ] = $ sound ;
328
328
}
329
329
330
- $ this ->sendNotificationCustom ($ params );
330
+ return $ this ->sendNotificationCustom ($ params );
331
331
}
332
332
333
333
/**
@@ -356,13 +356,13 @@ public function sendNotificationCustom($parameters = [])
356
356
$ parameters ['included_segments ' ] = ['all ' ];
357
357
}
358
358
$ parameters = array_merge ($ parameters , $ this ->additionalParams );
359
- \Log::alert ('from OneSignal ' , $ parameters );
359
+ // \Log::alert('from OneSignal', $parameters);
360
360
361
361
$ this ->headers ['body ' ] = json_encode ($ parameters );
362
362
$ this ->headers ['buttons ' ] = json_encode ($ parameters );
363
363
$ this ->headers ['verify ' ] = false ;
364
364
365
- return $ this ->post (self ::ENDPOINT_NOTIFICATIONS );
365
+ return json_decode ( $ this ->post (self ::ENDPOINT_NOTIFICATIONS )-> getBody ()-> getContents () );
366
366
}
367
367
368
368
/**
0 commit comments