$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;
// @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...)
$object[$objectName] = $props;
}
- // GeoJSON
-
if (!empty($this->geopoint)) {
list($lat, $long) = explode(' ', $this->geopoint);
}
if (!empty($this->poco)) {
- $object['contact'] = $this->poco->asArray();
+ $object['contact'] = array_filter($this->poco->asArray());
}
Event::handle('EndActivityObjectOutputJson', array($this, &$object));
}