Don't attempt to dereference in the outbox

This commit is contained in:
Jeremy Dormitzer 2018-11-01 07:09:17 -04:00
parent d8365b9ff1
commit f1e577fd01
6 changed files with 6 additions and 6 deletions

View File

@ -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':

View File

@ -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;

View File

@ -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 );

View File

@ -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;

View File

@ -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 );

View File

@ -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',