]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Send thr:in-reply-to as well, for clarity...
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 1 Apr 2016 21:21:57 +0000 (23:21 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 1 Apr 2016 21:21:57 +0000 (23:21 +0200)
plugins/Favorite/classes/Fave.php

index 7dad591181c811a3ce3e4dec94cf333eade22de5..c9bb7a6dd27fa9284ff99dabc6ad17e33d094628 100644 (file)
@@ -193,6 +193,13 @@ class Fave extends Managed_DataObject
         $act->content = sprintf(_('%1$s favorited something by %2$s: %3$s'),
                                 $actor->getNickname(), $target->getProfile()->getNickname(),
                                 $target->getRendered());
+        $act->context = new ActivityContext();
+        $act->context->replyToID = $target->getUri();
+        try {
+            $act->context->replyToURL = $target->getUrl();
+        } catch (InvalidUrlException $e) {
+            // ok, no replyToURL, i.e. the href="" in <thr:in-reply-to/>
+        }
 
         $act->actor     = $actor->asActivityObject();
         $act->target    = $target->asActivityObject();