From 450881363852e784d50b62c8c425a135bcf10900 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 15 Jul 2015 14:00:36 +0930 Subject: [PATCH] Don't include deleted notifications in the unread count --- framework/core/src/Core/Users/User.php | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/core/src/Core/Users/User.php b/framework/core/src/Core/Users/User.php index 7ced9ff8e..ecdc0d47a 100755 --- a/framework/core/src/Core/Users/User.php +++ b/framework/core/src/Core/Users/User.php @@ -368,6 +368,7 @@ class User extends Model ->whereIn('type', $this->getAlertableNotificationTypes()) ->where('time', '>', $this->notification_read_time ?: 0) ->where('is_read', 0) + ->where('is_deleted', 0) ->count($this->getConnection()->raw('DISTINCT type, subject_id')); }