Don't show double introductions

pull/11360/head
Michael 2022-03-19 18:38:59 +00:00
parent 91905bea89
commit e4a5094c90
1 changed files with 7 additions and 1 deletions

View File

@ -33,6 +33,7 @@ use Friendica\Database\DBA;
use Friendica\DI; use Friendica\DI;
use Friendica\Model\Group; use Friendica\Model\Group;
use Friendica\Model\Post; use Friendica\Model\Post;
use Friendica\Model\User;
use Friendica\Model\Verb; use Friendica\Model\Verb;
use Friendica\Module\Register; use Friendica\Module\Register;
use Friendica\Module\Response; use Friendica\Module\Response;
@ -183,7 +184,12 @@ class Ping extends BaseModule
} }
} }
$navNotifications = array_map(function (Entity\Notification $notification) { $owner = User::getOwnerDataById(local_user());
$navNotifications = array_map(function (Entity\Notification $notification) use ($owner) {
if (($notification->type == Post\UserNotification::TYPE_NONE) && in_array($owner['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP])) {
return null;
}
try { try {
return $this->formattedNavNotification->createFromNotification($notification); return $this->formattedNavNotification->createFromNotification($notification);
} catch (NoMessageException $e) { } catch (NoMessageException $e) {