delete if response code is 410 or 404
This commit is contained in:
parent
df02d2202e
commit
463bff834b
1 changed files with 3 additions and 1 deletions
|
@ -121,7 +121,9 @@ class Scheduler {
|
||||||
foreach ( $followers as $follower ) {
|
foreach ( $followers as $follower ) {
|
||||||
$meta = get_remote_metadata_by_actor( $follower->get_actor() );
|
$meta = get_remote_metadata_by_actor( $follower->get_actor() );
|
||||||
|
|
||||||
if ( empty( $meta ) || ! is_array( $meta ) || is_wp_error( $meta ) ) {
|
if ( is_tombstone( $meta ) ) {
|
||||||
|
$follower->delete();
|
||||||
|
} elseif ( empty( $meta ) || ! is_array( $meta ) || is_wp_error( $meta ) ) {
|
||||||
if ( 5 >= $follower->count_errors() ) {
|
if ( 5 >= $follower->count_errors() ) {
|
||||||
$follower->delete();
|
$follower->delete();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue