Also use the event_source object for the backfill entry
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.4 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Has been cancelled
Some checks failed
PHP Code Checker / PHP Code Checker (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.0 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.1 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.2 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.3 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 8.4 (pull_request) Has been cancelled
PHPUnit / PHPUnit – PHP 7.4 (pull_request) Has been cancelled
This commit is contained in:
parent
60ebd72e41
commit
f9bd26cf09
2 changed files with 4 additions and 11 deletions
|
@ -75,6 +75,6 @@ class Accept {
|
||||||
);
|
);
|
||||||
|
|
||||||
// Trigger the backfilling of events from this actor.
|
// 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 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,17 +39,10 @@ class Outbox_Parser {
|
||||||
/**
|
/**
|
||||||
* Initialize the backfilling of events via the outbox of an ActivityPub actor.
|
* 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
|
* @return bool|WP_Error
|
||||||
*/
|
*/
|
||||||
public static function backfill_events( $actor ) {
|
public static function backfill_events( $event_source ) {
|
||||||
// Initiate parsing of outbox collection.
|
|
||||||
$event_source = Event_Source::get_by_id( $actor );
|
|
||||||
|
|
||||||
if ( ! $event_source ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$outbox_url = $event_source->get_outbox();
|
$outbox_url = $event_source->get_outbox();
|
||||||
|
|
||||||
if ( ! $outbox_url ) {
|
if ( ! $outbox_url ) {
|
||||||
|
@ -57,7 +50,7 @@ class Outbox_Parser {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Schedule the import of events via the outbox.
|
// 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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue