We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 1188d5ba authored by Evan Prodromou's avatar Evan Prodromou

Don't output deprecated <activity:actor> element

parent e0606d3e
......@@ -377,13 +377,7 @@ class Activity
$xs->element('updated', null, $published);
if ($author) {
$xs->elementStart('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');
$this->actor->outputTo($xs, 'author');
}
if ($this->verb != ActivityVerb::POST || count($this->objects) != 1) {
......
......@@ -498,14 +498,21 @@ class ActivityObject
$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)) {
$xo->element(
self::TITLE,
null,
common_xml_safe_str($this->title)
);
$name = common_xml_safe_str($this->title);
if ($tag == 'author') {
$xo->element(self::NAME, null, $name);
} else {
$xo->element(self::TITLE, null, $name);
}
}
if (!empty($this->summary)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment