Add Event Sources Logic (ActivityPub follows) #86

Open
linos wants to merge 95 commits from event_sources into main
2 changed files with 4 additions and 11 deletions
Showing only changes of commit f9bd26cf09 - Show all commits

View file

@ -75,6 +75,6 @@ class Accept {
);
// Trigger the backfilling of events from this actor.
\do_action( 'event_bridge_for_activitypub_backfill_events', $activity['actor'] );
\do_action( 'event_bridge_for_activitypub_backfill_events', $event_source );
}
}

View file

@ -39,17 +39,10 @@ class Outbox_Parser {
/**
* Initialize the backfilling of events via the outbox of an ActivityPub actor.
*
* @param string $actor The ActivityPub ID of the actor which owns the outbox.
* @param Event_Source $event_source The Source we want to backfill the events for.
* @return bool|WP_Error
*/
public static function backfill_events( $actor ) {
// Initiate parsing of outbox collection.
$event_source = Event_Source::get_by_id( $actor );
if ( ! $event_source ) {
return;
}
public static function backfill_events( $event_source ) {
$outbox_url = $event_source->get_outbox();
if ( ! $outbox_url ) {
@ -57,7 +50,7 @@ class Outbox_Parser {
}
// Schedule the import of events via the outbox.
return self::queue_importing_from_outbox( $outbox_url, $actor, 0 );
return self::queue_importing_from_outbox( $outbox_url, $event_source->get_id(), 0 );
}
/**