diff --git a/src/Service/RDAPService.php b/src/Service/RDAPService.php index 89c5391..012ee1b 100644 --- a/src/Service/RDAPService.php +++ b/src/Service/RDAPService.php @@ -76,7 +76,8 @@ readonly class RDAPService 'xn--hlcj6aya9esc7a', ]; - public const IMPORTANT_EVENTS = [EventAction::Deletion->value, EventAction::Expiration->value]; + private const IMPORTANT_EVENTS = [EventAction::Deletion->value, EventAction::Expiration->value]; + private const IMPORTANT_STATUS = ['auto renew period', 'redemption period', 'pending delete']; public function __construct(private HttpClientInterface $client, private EntityRepository $entityRepository, @@ -106,6 +107,11 @@ readonly class RDAPService return false; } + $status = $domain->getStatus(); + if (!empty($status) && count(array_intersect($status, self::IMPORTANT_STATUS))) { + return true; + } + /** @var DomainEvent[] $events */ $events = $domain->getEvents() ->filter(fn (DomainEvent $e) => $e->getDate() <= new \DateTimeImmutable('now'))