]> git.mxchange.org Git - friendica.git/commitdiff
Remove fake private message notifications from ping output
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 30 Dec 2018 06:11:30 +0000 (01:11 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 30 Dec 2018 06:11:30 +0000 (01:11 -0500)
mod/ping.php

index 2783b83ddba63bd84843b5383c7596e6e0f2608f..18b126cce560f30b4011c86c9b7004a2f093c38e 100644 (file)
@@ -275,22 +275,6 @@ function ping_init(App $a)
                        }
                }
 
-               if (DBA::isResult($mails)) {
-                       foreach ($mails as $mail) {
-                               $notif = [
-                                       'id'      => 0,
-                                       'href'    => System::baseUrl() . '/message/' . $mail['id'],
-                                       'name'    => $mail['from-name'],
-                                       'url'     => $mail['from-url'],
-                                       'photo'   => $mail['from-photo'],
-                                       'date'    => $mail['created'],
-                                       'seen'    => false,
-                                       'message' => L10n::t('{0} sent you a message'),
-                               ];
-                               $notifs[] = $notif;
-                       }
-               }
-
                if (DBA::isResult($regs)) {
                        foreach ($regs as $reg) {
                                $notif = [
@@ -377,7 +361,7 @@ function ping_init(App $a)
        if ($format == 'json') {
                $data['groups'] = $groups_unseen;
                $data['forums'] = $forums_unseen;
-               $data['notify'] = $sysnotify_count + $intro_count + $mail_count + $register_count;
+               $data['notify'] = $sysnotify_count + $intro_count + $register_count;
                $data['notifications'] = $notifications;
                $data['sysmsgs'] = [
                        'notice' => $sysmsgs,