From 11a0bde4595d2779b2587398c4b69bfcee116880 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 9 Dec 2010 13:11:02 -0500 Subject: AtomPub for single subscription --- classes/Subscription.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'classes/Subscription.php') diff --git a/classes/Subscription.php b/classes/Subscription.php index e9ad2a5a2..d41349412 100644 --- a/classes/Subscription.php +++ b/classes/Subscription.php @@ -245,6 +245,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, @@ -262,6 +264,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; } } -- cgit v1.2.3-54-g00ecf