]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Fave.php
Show a single favorite for AtomPub
[quix0rs-gnu-social.git] / classes / Fave.php
index 9922ae45c54bbc626965624f7bce05b9d9c0b735..030e67b56138fc796552e8edd149126a880b9d97 100644 (file)
@@ -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;
     }
 }