From 8fe5da930adf37558d8bed2cdd521cfcc0455fe7 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 9 Nov 2020 11:41:21 -0500 Subject: [PATCH] Only set the current notify as seen when user enabled detailed notifications --- src/Module/Notifications/Notification.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Module/Notifications/Notification.php b/src/Module/Notifications/Notification.php index 2dc008248..4566c4223 100644 --- a/src/Module/Notifications/Notification.php +++ b/src/Module/Notifications/Notification.php @@ -108,7 +108,13 @@ class Notification extends BaseModule if ($request_id) { $notify = DI::notify()->getByID($request_id, local_user()); - DI::notify()->setSeen(true, $notify); + + if (DI::pConfig()->get(local_user(), 'system', 'detailed_notif')) { + $notify->seen = true; + DI::notify()->update($notify); + } else { + DI::notify()->setSeen(true, $notify); + } if (!empty($notify->link)) { System::externalRedirect($notify->link);