mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: dispatch DetectDomainChange if registerDomain is successful
This commit is contained in:
@@ -96,6 +96,11 @@ final readonly class UpdateDomainHandler
|
|||||||
* We send messages that correspond to the sending of notifications that will not be processed here.
|
* We send messages that correspond to the sending of notifications that will not be processed here.
|
||||||
*/
|
*/
|
||||||
$this->RDAPService->registerDomain($domain->getLdhName());
|
$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) {
|
} catch (DomainNotFoundException) {
|
||||||
$newDomain = $this->domainRepository->findOneBy(['ldhName' => $domain->getLdhName()]);
|
$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.
|
* 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));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user