mirror of
https://github.com/friendica/friendica
synced 2025-04-25 08:30:11 +00:00
Issue 11469: Repect desktop notification settings
This commit is contained in:
parent
511a51b9a3
commit
1dccc31508
5 changed files with 32 additions and 23 deletions
|
@ -143,17 +143,7 @@ class Subscription
|
|||
{
|
||||
$type = \Friendica\Factory\Api\Mastodon\Notification::getType($Notification);
|
||||
|
||||
$desktop_notification = !in_array($type, [Notification::TYPE_RESHARE, Notification::TYPE_LIKE]);
|
||||
|
||||
if (DI::pConfig()->get($Notification->uid, 'system', 'notify_like') && ($type == Notification::TYPE_LIKE)) {
|
||||
$desktop_notification = true;
|
||||
}
|
||||
|
||||
if (DI::pConfig()->get($Notification->uid, 'system', 'notify_announce') && ($type == Notification::TYPE_RESHARE)) {
|
||||
$desktop_notification = true;
|
||||
}
|
||||
|
||||
if ($desktop_notification) {
|
||||
if (DI::notify()->NotifyOnDesktop($Notification, $type)) {
|
||||
DI::notify()->createFromNotification($Notification);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue