]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Notifications/Ping.php
Allow the search for contacts on blocked servers via web
[friendica.git] / src / Module / Notifications / Ping.php
index df75c047afdd8b8c25d8f135743710db1e930786..3cd4d702010dc9e61c1e702618649e15014aaffa 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -116,8 +116,8 @@ class Ping extends BaseModule
                $birthday_count       = 0;
                $today_birthday_count = 0;
 
-
-               if ($this->session->getLocalUserId()) {
+               // Suppress notification display for forum accounts
+               if ($this->session->getLocalUserId() && $this->session->get('page_flags', '') != User::PAGE_FLAGS_COMMUNITY) {
                        if ($this->pconfig->get($this->session->getLocalUserId(), 'system', 'detailed_notif')) {
                                $notifications = $this->notificationRepo->selectDetailedForUser($this->session->getLocalUserId());
                        } else {
@@ -244,7 +244,7 @@ class Ping extends BaseModule
                                                $registration['url'],
                                                $this->l10n->t('{0} requested registration'),
                                                new \DateTime($registration['created'], new \DateTimeZone('UTC')),
-                                               new Uri($this->baseUrl->get(true) . '/moderation/users/pending')
+                                               new Uri($this->baseUrl . '/moderation/users/pending')
                                        );
                                }
                        } else {
@@ -253,7 +253,7 @@ class Ping extends BaseModule
                                        $registrations[0]['url'],
                                        $this->l10n->t('{0} and %d others requested registration', count($registrations) - 1),
                                        new \DateTime($registrations[0]['created'], new \DateTimeZone('UTC')),
-                                       new Uri($this->baseUrl->get(true) . '/moderation/users/pending')
+                                       new Uri($this->baseUrl . '/moderation/users/pending')
                                );
                        }