get_id(), $activity['actor'] ); // Check if the object of the `Accept` is indeed the `Follow` request we sent to that actor. if ( object_to_uri( $activity['object'] ) !== $follow_id ) { return; } // Get the WordPress post ID of the Event Source. This should not be able to fail here. $post_id = $event_source->get__id(); if ( ! $post_id ) { return; } // Save the accept status of the follow request to the event source post. \update_post_meta( $post_id, '_event_bridge_for_activitypub_accept_of_follow', $activity['id'] ); \wp_update_post( array( 'ID' => $post_id, 'post_status' => 'publish', ) ); // Trigger the backfilling of events from this actor. \do_action( 'event_bridge_for_activitypub_backfill_events', $event_source ); } }