aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2017-05-06 11:34:38 +0200
committerMikael Nordfeldth <mmn@hethane.se>2017-05-06 14:38:41 +0200
commit7da925ca70c74c3466fd0477403109ed40d02175 (patch)
tree6edadfc3369e7cc865d8753c3a7f0cf513e72be6
parent985f3b44b7378d95a5294b85beac6c8506810a48 (diff)
downloadgnu-social-7da925ca70c74c3466fd0477403109ed40d02175.tar
gnu-social-7da925ca70c74c3466fd0477403109ed40d02175.zip
Handle selfLink in ActivityObject
-rw-r--r--lib/activityobject.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/activityobject.php b/lib/activityobject.php
index 87eea13727..fc62e5f46c 100644
--- a/lib/activityobject.php
+++ b/lib/activityobject.php
@@ -102,6 +102,7 @@ class ActivityObject
public $content;
public $owner;
public $link;
+ public $selfLink; // think APP (Atom Publishing Protocol)
public $source;
public $avatarLinks = array();
public $geopoint;
@@ -263,6 +264,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);
@@ -651,6 +653,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);