mirror of
https://github.com/friendica/friendica
synced 2025-04-26 12:30:11 +00:00
The desktop notifications have been reworked
This commit is contained in:
parent
632d1024f7
commit
42de5c77d0
7 changed files with 476 additions and 290 deletions
|
@ -142,6 +142,21 @@ class Subscription
|
|||
$notification = DBA::selectFirst('notification', [], ['id' => $nid]);
|
||||
|
||||
$type = Notification::getType($notification);
|
||||
|
||||
$desktop_notification = !in_array($type, ['reblog', 'favourite']);
|
||||
|
||||
if (DI::pConfig()->get($notification['uid'], 'system', 'notify_like') && ($type == 'favourite')) {
|
||||
$desktop_notification = true;
|
||||
}
|
||||
|
||||
if (DI::pConfig()->get($notification['uid'], 'system', 'notify_announce') && ($type == 'reblog')) {
|
||||
$desktop_notification = true;
|
||||
}
|
||||
|
||||
if ($desktop_notification) {
|
||||
notification_from_array($notification);
|
||||
}
|
||||
|
||||
if (empty($type)) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue