private function getNotificationIds(AccountInterface $account, array $status = [], Entity $entity = NULL) {
    $destinations = ['notifications'];

    $uid = $account->id();

    $entity_query = \Drupal::entityQuery('activity');
    $entity_query->condition('field_activity_recipient_user', $uid, '=');
    $entity_query->condition('field_activity_destinations', $destinations, 'IN');

    if ($entity !== NULL) {
      $entity_type = $entity->getEntityTypeId();
      $entity_id = $entity->id();
      $entity_query->condition('field_activity_entity.target_id', $entity_id, '=');
      $entity_query->condition('field_activity_entity.target_type', $entity_type, '=');

    }
    if (!empty($status)) {
      $entity_query->condition('field_activity_status', $status, 'IN');
    }

    $ids = $entity_query->execute();

    return $ids;
  }