Don't attempt to dereference in the outbox
This commit is contained in:
parent
d8365b9ff1
commit
f1e577fd01
@ -48,7 +48,7 @@ function handle_outbox( $actor_slug, $activity ) {
|
||||
array( 'status' => 400 )
|
||||
);
|
||||
}
|
||||
$object = \pterotype\util\dereference_object( $activity['object'] );
|
||||
$object = $activity['object'];
|
||||
if ( array_key_exists( 'type', $object ) ) {
|
||||
switch ( $object['type'] ) {
|
||||
case 'Follow':
|
||||
|
@ -14,7 +14,7 @@ function handle_outbox( $actor, $activity ) {
|
||||
);
|
||||
}
|
||||
$actor_id = \pterotype\actors\get_actor_id( $actor );
|
||||
$object = \pterotype\util\dereference_object( $activity['object'] );
|
||||
$object = $activity['object'];
|
||||
$res = \pterotype\blocks\create_block( $actor_id, $object );
|
||||
if ( is_wp_error( $res ) ) {
|
||||
return $res;
|
||||
|
@ -30,7 +30,7 @@ function handle_outbox( $actor_slug, $activity ) {
|
||||
'invalid_actor', __( 'Expecting a valid actor', 'pterotype' )
|
||||
);
|
||||
}
|
||||
$object = \pterotype\util\dereference_object( $activity['object'] );
|
||||
$object = $activity['object'];
|
||||
$attributed_actor = $activity['actor'];
|
||||
$object['attributedTo'] = $attributed_actor;
|
||||
reconcile_receivers( $object, $activity );
|
||||
|
@ -14,7 +14,7 @@ function handle_outbox( $actor, $activity ) {
|
||||
array( 'status' => 400 )
|
||||
);
|
||||
}
|
||||
$object = \pterotype\util\dereference_object( $activity['object'] );
|
||||
$object = $activity['object'];
|
||||
$tombstone = \pterotype\objects\delete_object( $object );
|
||||
if ( is_wp_error( $tombstone ) ) {
|
||||
return $tombstone;
|
||||
|
@ -15,7 +15,7 @@ function handle_outbox( $actor_slug, $activity ) {
|
||||
array( 'status' => 400 )
|
||||
);
|
||||
}
|
||||
$object = \pterotype\util\dereference_object( $activity['object'] );
|
||||
$object = $activity['object'];
|
||||
$object_row = \pterotype\objects\upsert_object( $object );
|
||||
$actor_id = \pterotype\actors\get_actor_id( $actor_slug );
|
||||
$res = \pterotype\following\request_follow( $actor_id, $object_row->id );
|
||||
|
@ -14,7 +14,7 @@ function handle_outbox( $actor, $activity ) {
|
||||
array( 'status' => 400 )
|
||||
);
|
||||
}
|
||||
$object = \pterotype\util\dereference_object( $activity['object'] );
|
||||
$object = $activity['object'];
|
||||
if ( !array_key_exists( 'id', $object ) ) {
|
||||
return new \WP_Error(
|
||||
'invalid_object',
|
||||
|
Loading…
Reference in New Issue
Block a user