X-Git-Url: https://git.mxchange.org/?p=quix0rs-gnu-social.git;a=blobdiff_plain;f=lib%2Fapi.php;h=b987badc06a78bfd74053a5f96b032715c42b768;hp=fd07bbbbe080a6644c9e69dcd7b624d82942db95;hb=b2e8d8407cc7f1abb5e8767cd3403ac356775eaa;hpb=4e6f587f868d71f08c618d0dedf6ddf0331619c2 diff --git a/lib/api.php b/lib/api.php index fd07bbbbe0..b987badc06 100644 --- a/lib/api.php +++ b/lib/api.php @@ -289,11 +289,12 @@ class ApiAction extends Action $twitter_status['attachments'] = array(); foreach ($attachments as $attachment) { - if ($attachment->isEnclosure()) { + $enclosure_o=$attachment->getEnclosure(); + if ($enclosure_o) { $enclosure = array(); - $enclosure['url'] = $attachment->url; - $enclosure['mimetype'] = $attachment->mimetype; - $enclosure['size'] = $attachment->size; + $enclosure['url'] = $enclosure_o->url; + $enclosure['mimetype'] = $enclosure_o->mimetype; + $enclosure['size'] = $enclosure_o->size; $twitter_status['attachments'][] = $enclosure; } }