mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 17:55:42 +00:00
feat: add log message when a domain is deleted from WHOIS
This commit is contained in:
parent
94a29bc8df
commit
545677ddf7
@ -166,6 +166,11 @@ final readonly class UpdateDomainHandler
|
||||
$newDomain = $this->domainRepository->findOneBy(['ldhName' => $domain->getLdhName()]);
|
||||
|
||||
if (!$deleted && null !== $newDomain && $newDomain->getDeleted()) {
|
||||
$this->logger->info('Domain has been deleted from WHOIS: a notification is sent to user', [
|
||||
'ldhName' => $message->ldhName,
|
||||
'username' => $watchlist->getUser()->getUserIdentifier(),
|
||||
]);
|
||||
|
||||
$notification = new DomainDeletedNotification($this->sender, $domain);
|
||||
$this->mailer->send($notification->asEmailMessage(new Recipient($watchlist->getUser()->getEmail()))->getMessage());
|
||||
$this->chatNotificationService->sendChatNotification($watchlist, $notification);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user