]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activityobject.php
Misses this file to merge. I like the comments.
[quix0rs-gnu-social.git] / lib / activityobject.php
index 9a6218de3af9e954a97d7cd92a0e509c2f88fd24..2fe52eefcc5a84f883757f9aba8818446d1a657b 100644 (file)
@@ -274,6 +274,10 @@ class ActivityObject
     // @todo FIXME: rationalize with Activity::_fromRssItem()
     private function _fromRssItem($item)
     {
+        if (empty($this->type)) {
+            $this->type = ActivityObject::NOTE;
+        }
+
         $this->title = ActivityUtils::childContent($item, ActivityObject::TITLE, Activity::RSS);
 
         $contentEl = ActivityUtils::child($item, ActivityUtils::CONTENT, Activity::CONTENTNS);
@@ -508,11 +512,11 @@ class ActivityObject
 
             switch (self::canonicalType($object->type)) {
             case 'image':
-                $object->largerImage = $file->url;
+                $object->largerImage = $file->getUrl();
                 break;
             case 'video':
             case 'audio':
-                $object->stream = $file->url;
+                $object->stream = $file->getUrl();
                 break;
             }
 
@@ -857,7 +861,7 @@ class ActivityObject
                 if (is_string($this->thumbnail)) {
                     $object['image'] = array('url' => $this->thumbnail);
                 } else {
-                    $object['image'] = array('url' => $this->thumbnail->url);
+                    $object['image'] = array('url' => $this->thumbnail->getUrl());
                     if ($this->thumbnail->width) {
                         $object['image']['width'] = $this->thumbnail->width;
                     }