summaryrefslogtreecommitdiff
path: root/classes/Fave.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-12-10 18:50:50 -0500
committerEvan Prodromou <evan@status.net>2010-12-10 18:50:50 -0500
commit37c447be4637dc639f586846d35e14a4bfce069d (patch)
treebd8a32d7138c4211c089fc10e887866316f5cf2c /classes/Fave.php
parent167f760ab8c0b80652a1aab88a88fd207091d714 (diff)
Show a single favorite for AtomPub
Diffstat (limited to 'classes/Fave.php')
-rw-r--r--classes/Fave.php10
1 files changed, 10 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;
}
}