]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activityobject.php
check for 'post' verb in microapps by default
[quix0rs-gnu-social.git] / lib / activityobject.php
index 0343fa664ed374315cf9b3bea12b21e0a7132ce8..7204980d40b8b505554935a2730370179eefec34 100644 (file)
@@ -679,16 +679,19 @@ class ActivityObject
         $object = array();
 
         if (Event::handle('StartActivityObjectOutputJson', array($this, &$object))) {
-            // XXX: attachedObjects are added by Activity
+            // XXX: attachments are added by Activity
+
+            // author (Add object for author? Could be useful for repeats.)
+
+            // content (Add rendered version of the notice?)
 
             // displayName
             $object['displayName'] = $this->title;
 
-            // TODO: downstreamDuplicates
-
-            // embedCode (used for video)
+            // downstreamDuplicates
 
             // id
+            $object['id'] = $this->id;
             //
             // XXX: Should we use URL here? or a crazy tag URI?
             $object['id'] = $this->id;
@@ -736,9 +739,13 @@ class ActivityObject
             // @fixme this breaks extension URIs
             $object['type'] = substr($this->type, strrpos($this->type, '/') + 1);
 
+            // published (probably don't need. Might be useful for repeats.)
+
             // summary
             $object['summary'] = $this->summary;
 
+            // udpated (probably don't need this)
+
             // TODO: upstreamDuplicates
 
             // url (XXX: need to put the right thing here...)
@@ -753,8 +760,6 @@ class ActivityObject
                 $object[$objectName] = $props;
             }
 
-            // GeoJSON
-
             if (!empty($this->geopoint)) {
 
                 list($lat, $long) = explode(' ', $this->geopoint);
@@ -766,7 +771,7 @@ class ActivityObject
             }
 
             if (!empty($this->poco)) {
-                $object['contact'] = $this->poco->asArray();
+                $object['contact'] = array_filter($this->poco->asArray());
             }
             Event::handle('EndActivityObjectOutputJson', array($this, &$object));
         }