]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/twitterapi.php
Display linked oembed resources as enclosures if they are of non-html mime types
[quix0rs-gnu-social.git] / lib / twitterapi.php
index 58300720865ced1b66ee77f2795a3f6c449ea862..e0087e689c874514422bb5693aa4f010c1ddbea6 100644 (file)
@@ -274,11 +274,12 @@ class TwitterapiAction extends Action
         $enclosures = 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;
                  $enclosures[] = $enclosure;
             }
         }