diff --git a/includes/class-dispatcher.php b/includes/class-dispatcher.php index 8a6628a39..b9fb198cd 100644 --- a/includes/class-dispatcher.php +++ b/includes/class-dispatcher.php @@ -104,6 +104,7 @@ public static function process_outbox( $id ) { } else { // No followers to process for this update. We're done. \wp_publish_post( $outbox_item ); + \delete_post_meta( $outbox_item->ID, '_activitypub_outbox_offset' ); } } diff --git a/includes/collection/class-outbox.php b/includes/collection/class-outbox.php index d00b702c2..e8332e4c0 100644 --- a/includes/collection/class-outbox.php +++ b/includes/collection/class-outbox.php @@ -121,10 +121,9 @@ private static function invalidate_existing_items( $object_id, $activity_type, $ ) ); - if ( $existing_items ) { - foreach ( $existing_items as $existing_item_id ) { - \wp_publish_post( $existing_item_id ); - } + foreach ( $existing_items as $existing_item_id ) { + \wp_publish_post( $existing_item_id ); + \delete_post_meta( $existing_item_id, '_activitypub_outbox_offset' ); } } }