mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: update weekly if removed from WHOIS
This commit is contained in:
@@ -80,7 +80,7 @@ export function WatchlistCard({watchlist, onUpdateWatchlist, connectors, onDelet
|
|||||||
dataSource={[{
|
dataSource={[{
|
||||||
domains: watchlist.domains.map(d => <Tag
|
domains: watchlist.domains.map(d => <Tag
|
||||||
color={
|
color={
|
||||||
d.deleted ? 'red' : // If the domain is deleted
|
d.deleted ? 'magenta' : // If the domain is deleted
|
||||||
d.status.includes('redemption period') ? 'yellow' :
|
d.status.includes('redemption period') ? 'yellow' :
|
||||||
d.status.includes('pending delete') ? 'volcano' : 'default'
|
d.status.includes('pending delete') ? 'volcano' : 'default'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -372,15 +372,22 @@ class Domain
|
|||||||
*/
|
*/
|
||||||
public function isToBeUpdated(bool $fromUser = true): bool
|
public function isToBeUpdated(bool $fromUser = true): bool
|
||||||
{
|
{
|
||||||
return $this->getUpdatedAt()
|
return $this->getUpdatedAt()->diff(new \DateTimeImmutable())->days >= 7
|
||||||
->diff(new \DateTimeImmutable())->days >= 7
|
|| $this->getDeleted()
|
||||||
|| (($fromUser || ($this->getUpdatedAt()
|
? $fromUser
|
||||||
|
: (
|
||||||
|
($fromUser || ($this->getUpdatedAt()
|
||||||
->diff(new \DateTimeImmutable())->h * 60 + $this->getUpdatedAt()
|
->diff(new \DateTimeImmutable())->h * 60 + $this->getUpdatedAt()
|
||||||
->diff(new \DateTimeImmutable())->i) >= 50)
|
->diff(new \DateTimeImmutable())->i) >= 50
|
||||||
&& $this->isToBeWatchClosely())
|
)
|
||||||
|
&& $this->isToBeWatchClosely()
|
||||||
|| (count(array_intersect($this->getStatus(), ['auto renew period', 'client hold', 'server hold'])) > 0
|
)
|
||||||
&& $this->getUpdatedAt()->diff(new \DateTimeImmutable())->days >= 1);
|
|| (
|
||||||
|
false == $this->getDeleted() && (
|
||||||
|
count(array_intersect($this->getStatus(), ['auto renew period', 'client hold', 'server hold'])) > 0
|
||||||
|
&& $this->getUpdatedAt()->diff(new \DateTimeImmutable())->days >= 1
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user