code: def delete_all(self, user=None):
          
          qs = self.active()
          if user:
              qs = qs.filter(recipient=user)
  
          soft_delete = getattr(settings, 'NOTIFY_SOFT_DELETE', True)
  
          if soft_delete:
              qs.update(deleted=True)
          else:
              qs.delete()
docs: Method to soft-delete all notifications of a User (if supplied)
  
          :param user: Notification recipient.
  
          :return: Updates QuerySet as soft-deleted.