From 88b754ee8db8a341a1c35cd76e5fa354a24dbf7a 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 --- src/Core/Users/User.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Core/Users/User.php b/src/Core/Users/User.php index 7ced9ff8e..ecdc0d47a 100755 --- a/src/Core/Users/User.php +++ b/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')); }