Add tags to Activity Streams JSON

This commit is contained in:
Zach Copley 2011-02-18 09:29:49 -08:00
parent 60f62199a1
commit 20e414665d

View File

@ -437,6 +437,15 @@ class Activity
/* Purely extensions hereafter */ /* Purely extensions hereafter */
$tags = array();
// Use an Activity Object for term? Which object? Note?
foreach ($this->categories as $cat) {
$tags[] = $cat->term;
}
$activity['tags'] = $tags;
// XXX: a bit of a hack... Since JSON isn't namespaced we probably // XXX: a bit of a hack... Since JSON isn't namespaced we probably
// shouldn't be using 'statusnet:notice_info', but this will work // shouldn't be using 'statusnet:notice_info', but this will work
// for the moment. // for the moment.
@ -448,7 +457,6 @@ class Activity
} }
} }
/* more extensions */
// Context stuff. For now I'm just sticking most of it // Context stuff. For now I'm just sticking most of it
// in a property called "context" // in a property called "context"