File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -499,9 +499,13 @@ private function execPushNotifications() {
499
499
if ($ stmt ->rowCount () > 0 ) {
500
500
error_log ('Datenbankeinträge Push-Subscriptions: ' . $ stmt ->rowCount ());
501
501
502
+ $ webPush = new WebPush ($ push_auth );
502
503
$ notifications = array ();
503
504
foreach ($ stmt ->fetchAll () as $ row ) {
504
505
error_log ('Push-Sub: ' . $ row ['endpoint ' ]);
506
+ if (strpos ($ row ['endpoint ' ], 'mozilla ' ) > 0 ) {
507
+ $ webPush ->setAutomaticPadding (0 );
508
+ }
505
509
$ notifications [] = [
506
510
'subscription ' => Subscription::create ([
507
511
'endpoint ' => $ row ['endpoint ' ],
@@ -514,7 +518,6 @@ private function execPushNotifications() {
514
518
error_log ('payload: ' . $ notifications [sizeof ($ notifications )-1 ]['payload ' ]);
515
519
}
516
520
517
- $ webPush = new WebPush ($ push_auth );
518
521
foreach ($ notifications as $ notification ) {
519
522
$ webPush ->sendNotification ($ notification ['subscription ' ], $ notification ['payload ' ]);
520
523
}
You can’t perform that action at this time.
0 commit comments