diff --git a/includes/server/inbox.php b/includes/server/inbox.php index c79c7e6..378656e 100644 --- a/includes/server/inbox.php +++ b/includes/server/inbox.php @@ -188,7 +188,7 @@ function get_inbox( $actor_slug ) { $actor_id ), ARRAY_A ); return \pterotype\collections\make_ordered_collection( array_map( - function ( $result ) { + function( $result ) { return json_decode( $result['object'], true ); }, $results diff --git a/includes/server/shares.php b/includes/server/shares.php index 41c412c..86d8b77 100644 --- a/includes/server/shares.php +++ b/includes/server/shares.php @@ -32,7 +32,12 @@ function get_shares_collection( $object_id ) { if ( !$shares ) { $shares = array(); } - $collection = \pterotype\collections\make_ordered_collection( $shares ); + $collection = \pterotype\collections\make_ordered_collection( array_map( + function( $result ) { + return json_decode( $result['object'], true ); + }, + $shares + ) ); $collection['id'] = get_rest_url( null, sprintf( '/pterotype/v1/object/%d/shares', $object_id ) );