]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activity.php
Add context to Activity Streams JSON
[quix0rs-gnu-social.git] / lib / activity.php
index e2699ebadcfee1fb8d4a37be90d974ba85a5ec7a..218c965c4d0d505fe0ee4165106b259780bba0b8 100644 (file)
@@ -450,6 +450,9 @@ class Activity
 
         /* more extensions */
 
+        // Context stuff. For now I'm just sticking most of it
+        // in a property called "context"
+
         if (!empty($this->context)) {
 
             if (!empty($this->context->location)) {
@@ -461,8 +464,11 @@ class Activity
                     'type'        => 'Point',
                     'coordinates' => array($loc->lat, $loc->lon)
                 );
+
             }
 
+            $activity['to']      = $this->context->getToArray();
+            $activity['context'] = $this->context->asArray();
         }
 
         return array_filter($activity);