Revise domain status flow: skip uses takedown, add drop for permanent deletion
- Import default changed from 'hold' to 'pass' (auto-crawl) - Skip now uses PDS takedown (hides posts but preserves data) - Added 'drop' status for permanent deletion (requires skip first) - Added TakedownAccount/RestoreAccount PDS functions - Un-skip restores PDS accounts and reactivates feeds - Dashboard shows 'drop' button only for skipped domains Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -230,7 +230,7 @@ func (c *Crawler) ImportTestDomains(domains []string) {
|
||||
for _, host := range domains {
|
||||
_, err := c.db.Exec(`
|
||||
INSERT INTO domains (host, status, discovered_at, tld)
|
||||
VALUES ($1, 'hold', $2, $3)
|
||||
VALUES ($1, 'pass', $2, $3)
|
||||
ON CONFLICT(host) DO NOTHING
|
||||
`, host, now, getTLD(host))
|
||||
if err != nil {
|
||||
@@ -241,7 +241,7 @@ func (c *Crawler) ImportTestDomains(domains []string) {
|
||||
}
|
||||
}
|
||||
|
||||
// ImportDomainsFromFile reads a vertices file and stores new domains as "hold"
|
||||
// ImportDomainsFromFile reads a vertices file and stores new domains as "pass"
|
||||
func (c *Crawler) ImportDomainsFromFile(filename string, limit int) (imported int, skipped int, err error) {
|
||||
file, err := os.Open(filename)
|
||||
if err != nil {
|
||||
@@ -328,7 +328,7 @@ func (c *Crawler) ImportDomainsInBackground(filename string) {
|
||||
// Build rows for copy, applying auto-skip for spam patterns
|
||||
rows := make([][]interface{}, len(domains))
|
||||
for i, d := range domains {
|
||||
status := "hold"
|
||||
status := "pass"
|
||||
if shouldAutoSkipDomain(d.host) {
|
||||
status = "skip"
|
||||
}
|
||||
@@ -347,7 +347,7 @@ func (c *Crawler) ImportDomainsInBackground(filename string) {
|
||||
if err != nil {
|
||||
// Fall back to individual inserts with ON CONFLICT
|
||||
for _, d := range domains {
|
||||
status := "hold"
|
||||
status := "pass"
|
||||
if shouldAutoSkipDomain(d.host) {
|
||||
status = "skip"
|
||||
}
|
||||
@@ -436,7 +436,7 @@ func (c *Crawler) parseAndStoreDomains(reader io.Reader, limit int) (imported in
|
||||
|
||||
// Insert with ON CONFLICT, applying auto-skip for spam patterns
|
||||
for _, d := range domains {
|
||||
status := "hold"
|
||||
status := "pass"
|
||||
if shouldAutoSkipDomain(d.host) {
|
||||
status = "skip"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user