mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-18 02:05:36 +00:00
fix: dispatch DetectDomainChange if registerDomain is successful
This commit is contained in:
parent
b77dca9f62
commit
fb726ac88a
@ -96,6 +96,11 @@ final readonly class UpdateDomainHandler
|
||||
* We send messages that correspond to the sending of notifications that will not be processed here.
|
||||
*/
|
||||
$this->RDAPService->registerDomain($domain->getLdhName());
|
||||
|
||||
/** @var Watchlist $wl */
|
||||
foreach ($domain->getWatchlists()->getIterator() as $wl) {
|
||||
$this->bus->dispatch(new DetectDomainChange($wl->getToken(), $domain->getLdhName(), $updatedAt));
|
||||
}
|
||||
} catch (DomainNotFoundException) {
|
||||
$newDomain = $this->domainRepository->findOneBy(['ldhName' => $domain->getLdhName()]);
|
||||
|
||||
@ -117,10 +122,5 @@ final readonly class UpdateDomainHandler
|
||||
* In this case, the domain name can no longer be updated. Unfortunately, there is nothing more that can be done.
|
||||
*/
|
||||
}
|
||||
|
||||
/** @var Watchlist $wl */
|
||||
foreach ($domain->getWatchlists()->getIterator() as $wl) {
|
||||
$this->bus->dispatch(new DetectDomainChange($wl->getToken(), $domain->getLdhName(), $updatedAt));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user