Only set the current notify as seen when user enabled detailed notifications

This commit is contained in:
Hypolite Petovan 2020-11-09 11:41:21 -05:00
parent 62358104a2
commit 8fe5da930a

View file

@ -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);