X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FPushSubscription.php;h=895a0d0d2d3f45c23dd7aa075e7a468b1b401fdb;hb=3f309805919671ce0ae22f82f5a751050a07dce4;hp=48695bfcd0d52b589b7d58d80ca6c2bd9c2c4875;hpb=a49fb9cbf967977f7a66eba5d2c80e02fbc40bde;p=friendica.git diff --git a/src/Worker/PushSubscription.php b/src/Worker/PushSubscription.php index 48695bfcd0..895a0d0d2d 100644 --- a/src/Worker/PushSubscription.php +++ b/src/Worker/PushSubscription.php @@ -1,6 +1,6 @@ getMessageFromNotification($notification); - $title = $message['plain'] ?: ''; + $title = $message['plain'] ?? ''; $push = Subscription::create([ 'contentEncoding' => 'aesgcm', @@ -101,12 +101,11 @@ class PushSubscription ], ]); - // @todo Only used for logging? $payload = [ 'access_token' => $application_token['access_token'], 'preferred_locale' => $user['language'], 'notification_id' => $nid, - 'notification_type' => \Friendica\Factory\Api\Mastodon\Notification::getType($notification), + 'notification_type' => NotificationFactory::getType($notification), 'icon' => $actor['thumb'] ?? '', 'title' => $title ?: $l10n->t('Notification from Friendica'), 'body' => $body ?: $l10n->t('Empty Post'),