Remove contact immediately on 410 response code

This commit is contained in:
Matthew Exon 2024-07-13 17:49:01 +02:00
parent 946337645d
commit 2b617fc5c2
4 changed files with 44 additions and 0 deletions

View file

@ -174,6 +174,12 @@ class OnePoll
return false;
}
if ($curlResult->isGone()) {
Logger::notice('URL is permanently gone', ['id' => $contact['id'], 'url' => $contact['poll']]);
Contact::remove($contact['id']);
return false;
}
if ($curlResult->redirectIsPermanent()) {
Logger::notice('Poll address permanently changed', [
'id' => $contact['id'],