Issue 11469: Repect desktop notification settings

This commit is contained in:
Michael 2022-05-29 09:20:06 +00:00
parent 511a51b9a3
commit 1dccc31508
5 changed files with 32 additions and 23 deletions

View file

@ -187,6 +187,9 @@ class Ping extends BaseModule
$owner = User::getOwnerDataById(local_user());
$navNotifications = array_map(function (Entity\Notification $notification) use ($owner) {
if (!DI::notify()->NotifyOnDesktop($notification)) {
return null;
}
if (($notification->type == Post\UserNotification::TYPE_NONE) && in_array($owner['page-flags'], [User::PAGE_FLAGS_NORMAL, User::PAGE_FLAGS_PRVGROUP])) {
return null;
}