]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activity.php
Add avatars and notice info
[quix0rs-gnu-social.git] / lib / activity.php
index 6b3b121087ac502afd9783c53db78d22c2391b19..b9bd8c31fe7427cb4475e7fd1d51970840e4b16a 100644 (file)
@@ -437,10 +437,14 @@ class Activity
 
         /* Purely extensions hereafter */
 
-        if ($this->verb == ActivityVerb::POST) {
-            $activity['noticeInfo'] = $this->noticeInfo;
-        }
+        // XXX: a bit of a hack... Since JSON isn't namespaced we probably
+        // shouldn't be using 'statusnet:notice_info', but this will work
+        // for the moment.
 
+        foreach ($this->extra as $e) {
+            list($objectName, $props, $txt) = $e;
+            $activity[$objectName] = $props;
+        }
 
         return array_filter($activity);
     }