Don't include deleted notifications in the unread count

This commit is contained in:
Toby Zerner
2015-07-15 14:00:36 +09:30
parent 0bb00e4eb2
commit 88b754ee8d

View File

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