From 44f3117eaa687bafbe8a54b147d9588dcf917594 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sun, 21 Oct 2018 09:41:07 -0400 Subject: [PATCH] Formatting and a bug fix --- includes/server/inbox.php | 2 +- includes/server/shares.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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 ) );