diff options
author | Evan Prodromou <evan@status.net> | 2010-12-09 13:11:02 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-12-09 13:11:02 -0500 |
commit | 11a0bde4595d2779b2587398c4b69bfcee116880 (patch) | |
tree | 2d150255384657a13f923087e6a1eb105c641627 /classes | |
parent | 2f2c47eca98d493b18eaf9f70fee56c762865f89 (diff) |
AtomPub for single subscription
Diffstat (limited to 'classes')
-rw-r--r-- | classes/Subscription.php | 9 |
1 files changed, 9 insertions, 0 deletions
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; } } |