git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 7889b21e authored by mmn's avatar mmn

Handle selfLink in ActivityObject

parent 000af6d9
......@@ -100,6 +100,7 @@ class ActivityObject
public $content;
public $owner;
public $link;
public $selfLink; // think APP (Atom Publishing Protocol)
public $source;
public $avatarLinks = array();
public $geopoint;
......@@ -261,6 +262,7 @@ class ActivityObject
$this->source = $this->_getSource($element);
$this->link = ActivityUtils::getPermalink($element);
$this->selfLink = ActivityUtils::getSelfLink($element);
$this->id = $this->_childContent($element, self::ID);
......@@ -665,6 +667,18 @@ class ActivityObject
);
}
if (!empty($this->selfLink)) {
$xo->element(
'link',
array(
'rel' => 'self',
'type' => 'application/atom+xml',
'href' => $this->selfLink
),
null
);
}
if(!empty($this->owner)) {
$owner = $this->owner->asActivityNoun(self::AUTHOR);
$xo->raw($owner);
......
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