summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/Fave.php10
-rw-r--r--classes/Subscription.php9
2 files changed, 19 insertions, 0 deletions
diff --git a/classes/Fave.php b/classes/Fave.php
index 9922ae45c..030e67b56 100644
--- a/classes/Fave.php
+++ b/classes/Fave.php
@@ -138,6 +138,9 @@ class Fave extends Memcached_DataObject
$act = new Activity();
$act->verb = ActivityVerb::FAVORITE;
+
+ // FIXME: rationalize this with URL below
+
$act->id = TagURI::mint('favor:%d:%d:%s',
$profile->id,
$notice->id,
@@ -155,6 +158,13 @@ class Fave extends Memcached_DataObject
$act->actor = ActivityObject::fromProfile($profile);
$act->objects[] = ActivityObject::fromNotice($notice);
+ $url = common_local_url('AtomPubShowFavorite',
+ array('profile' => $this->user_id,
+ 'notice' => $this->notice_id));
+
+ $act->selfLink = $url;
+ $act->editLink = $url;
+
return $act;
}
}
diff --git a/classes/Subscription.php b/classes/Subscription.php
index 763e3835b..1d4f37929 100644
--- a/classes/Subscription.php
+++ b/classes/Subscription.php
@@ -253,6 +253,8 @@ class Subscription extends Memcached_DataObject
$act->verb = ActivityVerb::FOLLOW;
+ // XXX: rationalize this with the URL
+
$act->id = TagURI::mint('follow:%d:%d:%s',
$subscriber->id,
$subscribed->id,
@@ -270,6 +272,13 @@ class Subscription extends Memcached_DataObject
$act->actor = ActivityObject::fromProfile($subscriber);
$act->objects[] = ActivityObject::fromProfile($subscribed);
+ $url = common_local_url('AtomPubShowSubscription',
+ array('subscriber' => $subscriber->id,
+ 'subscribed' => $subscribed->id));
+
+ $act->selfLink = $url;
+ $act->editLink = $url;
+
return $act;
}