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 396a01cc32
commit 4508813638

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