]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/apiaction.php
Merge branch 'testing' into 0.9.x
[quix0rs-gnu-social.git] / lib / apiaction.php
index 2af150ab994d6f5bc9c60a849fadf0c7c715be41..9bfca3b66e49b643c403714c02744dd4ca0363fd 100644 (file)
@@ -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;
                 }
             }