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={[{
|
||||
domains: watchlist.domains.map(d => <Tag
|
||||
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('pending delete') ? 'volcano' : 'default'
|
||||
}
|
||||
|
||||
@@ -372,15 +372,22 @@ class Domain
|
||||
*/
|
||||
public function isToBeUpdated(bool $fromUser = true): bool
|
||||
{
|
||||
return $this->getUpdatedAt()
|
||||
->diff(new \DateTimeImmutable())->days >= 7
|
||||
|| (($fromUser || ($this->getUpdatedAt()
|
||||
return $this->getUpdatedAt()->diff(new \DateTimeImmutable())->days >= 7
|
||||
|| $this->getDeleted()
|
||||
? $fromUser
|
||||
: (
|
||||
($fromUser || ($this->getUpdatedAt()
|
||||
->diff(new \DateTimeImmutable())->h * 60 + $this->getUpdatedAt()
|
||||
->diff(new \DateTimeImmutable())->i) >= 50)
|
||||
&& $this->isToBeWatchClosely())
|
||||
|
||||
|| (count(array_intersect($this->getStatus(), ['auto renew period', 'client hold', 'server hold'])) > 0
|
||||
&& $this->getUpdatedAt()->diff(new \DateTimeImmutable())->days >= 1);
|
||||
->diff(new \DateTimeImmutable())->i) >= 50
|
||||
)
|
||||
&& $this->isToBeWatchClosely()
|
||||
)
|
||||
|| (
|
||||
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