From e9b05bd13f1bf3f74c63202f6f9f9fa2f65f19f1 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 30 Dec 2018 01:11:30 -0500 Subject: [PATCH] Remove fake private message notifications from ping output --- mod/ping.php | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/mod/ping.php b/mod/ping.php index 2783b83ddb..18b126cce5 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -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, -- 2.39.5