updated plugin ActivityPub version 2.2.0

This commit is contained in:
2024-03-28 09:39:50 +00:00
committed by Gitium
parent fd53533f59
commit 00c5db12cc
50 changed files with 1726 additions and 374 deletions

View File

@ -33,6 +33,10 @@ class Create {
* @return void
*/
public static function handle_create( $array, $user_id, $object = null ) {
if ( ACTIVITYPUB_DISABLE_INCOMING_INTERACTIONS ) {
return;
}
if (
! isset( $array['object'] ) ||
! isset( $array['object']['id'] )

View File

@ -81,7 +81,6 @@ class Delete {
// check if Object is an Actor.
if ( $activity['actor'] === $activity['object'] ) {
self::maybe_delete_follower( $activity );
self::maybe_delete_interactions( $activity );
} else { // assume a interaction otherwise.
self::maybe_delete_interaction( $activity );
}
@ -101,6 +100,7 @@ class Delete {
// verify if Actor is deleted.
if ( $follower && Http::is_tombstone( $activity['actor'] ) ) {
$follower->delete();
self::maybe_delete_interactions( $activity );
}
}