]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Subscription.php
Merge pull request #10619 from nupplaphil/task/guzzlehttp
[friendica.git] / src / Model / Subscription.php
index e3bbadcbf00141320eadff15061e0e1acaa72df6..59e71307f5ffb4092bf67fbe132ec823e65f63bc 100644 (file)
@@ -142,6 +142,21 @@ class Subscription
                $notification = DBA::selectFirst('notification', [], ['id' => $nid]);
 
                $type = Notification::getType($notification);
+
+               $desktop_notification = !in_array($type, ['reblog', 'favourite']);
+
+               if (DI::pConfig()->get($notification['uid'], 'system', 'notify_like') && ($type == 'favourite')) {
+                       $desktop_notification = true;
+               }
+
+               if (DI::pConfig()->get($notification['uid'], 'system', 'notify_announce') && ($type == 'reblog')) {
+                       $desktop_notification = true;
+               }
+
+               if ($desktop_notification) {
+                       notification_from_array($notification);
+               }
+
                if (empty($type)) {
                        return;
                }