From 9daa3b85c8b3ee48222a4b6c7c7ba70a3ca57fbb Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 17 Jul 2017 22:52:19 -0700 Subject: some corrections to AS encoding based on the current spec (some of this work was completed long before the spec settled). --- include/feedutils.php | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'include/feedutils.php') diff --git a/include/feedutils.php b/include/feedutils.php index b31448d81..daab1a741 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -1941,13 +1941,28 @@ function asencode_person($p) { $ret['type'] = 'Person'; $ret['id'] = $p['xchan_url']; $ret['name'] = $p['xchan_name']; - $ret['icon'] = [ $p['xchan_photo_l'] ]; - $ret['image'] = [ - 'type' => 'Link', - 'mediaType' => $p['xchan_photo_mimetype'], - 'href' => $p['xchan_photo_l'], - 'height' => 300, - 'width' => 300 + $ret['icon'] = [ + [ + 'type' => 'Image', + 'mediaType' => $p['xchan_photo_mimetype'], + 'url' => $p['xchan_photo_l'], + 'height' => 300, + 'width' => 300, + ], + [ + 'type' => 'Image', + 'mediaType' => $p['xchan_photo_mimetype'], + 'url' => $p['xchan_photo_m'], + 'height' => 80, + 'width' => 80, + ], + [ + 'type' => 'Image', + 'mediaType' => $p['xchan_photo_mimetype'], + 'url' => $p['xchan_photo_l'], + 'height' => 48, + 'width' => 48, + ] ]; $ret['url'] = [ 'type' => 'Link', -- cgit v1.2.3