Don't output deprecated <activity:actor> element

This commit is contained in:
Evan Prodromou 2010-12-27 09:25:26 -08:00
parent e0606d3eca
commit 1188d5bab2
2 changed files with 14 additions and 13 deletions

View File

@ -377,13 +377,7 @@ class Activity
$xs->element('updated', null, $published); $xs->element('updated', null, $published);
if ($author) { if ($author) {
$xs->elementStart('author'); $this->actor->outputTo($xs, 'author');
$xs->element('uri', array(), $this->actor->id);
if ($this->actor->title) {
$xs->element('name', array(), $this->actor->title);
}
$xs->elementEnd('author');
$this->actor->outputTo($xs, 'activity:actor');
} }
if ($this->verb != ActivityVerb::POST || count($this->objects) != 1) { if ($this->verb != ActivityVerb::POST || count($this->objects) != 1) {

View File

@ -498,14 +498,21 @@ class ActivityObject
$xo->element('activity:object-type', null, $this->type); $xo->element('activity:object-type', null, $this->type);
$xo->element(self::ID, null, $this->id); // <author> uses URI
if ($tag == 'author') {
$xo->element(self::URI, null, $this->id);
} else {
$xo->element(self::ID, null, $this->id);
}
if (!empty($this->title)) { if (!empty($this->title)) {
$xo->element( $name = common_xml_safe_str($this->title);
self::TITLE, if ($tag == 'author') {
null, $xo->element(self::NAME, null, $name);
common_xml_safe_str($this->title) } else {
); $xo->element(self::TITLE, null, $name);
}
} }
if (!empty($this->summary)) { if (!empty($this->summary)) {