]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/PushSubscription.php
Add suggestions
[friendica.git] / src / Worker / PushSubscription.php
index 60f559bc97a297c2e3ca333fdc9be255f4c09432..eaf2adb32d53a86fef59b9952d034a895874a556 100644 (file)
@@ -82,6 +82,9 @@ class PushSubscription
                        }
                }
 
+               $message = Notification::getMessage($notification);
+               $title = $message['plain'] ?: '';
+
                $push = Subscription::create([
                        'contentEncoding' => 'aesgcm',
                        'endpoint'        => $subscription['endpoint'],
@@ -97,7 +100,7 @@ class PushSubscription
                        'notification_id'   => $nid,
                        'notification_type' => $type,
                        'icon'              => $actor['thumb'] ?? '',
-                       'title'             => $l10n->t('Notification from Friendica'), // @todo Replace it with a speaking title
+                       'title'             => $title ?: $l10n->t('Notification from Friendica'),
                        'body'              => $body ?: $l10n->t('Empty Post'),
                ];