]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
correctly get replies for a notice in PuSH plugin
authorEvan Prodromou <evan@status.net>
Wed, 20 Jan 2010 21:16:22 +0000 (16:16 -0500)
committerEvan Prodromou <evan@status.net>
Wed, 20 Jan 2010 21:16:22 +0000 (16:16 -0500)
plugins/PubSubHubBub/PubSubHubBubPlugin.php

index f134086290f42ad7e3d6f131eca6dd8c05bc3d5f..96500404bc85b5cdfe2ca8c3b71faed1d9cb2530 100644 (file)
@@ -100,11 +100,15 @@ class PubSubHubBubPlugin extends Plugin
             $feeds[]=common_local_url('ApiTimelineFriends', array('id' => $user->nickname, 'format'=>'atom'));
         }
 
+        $replies = $notice->getReplies();
+
         //feed of user replied to
-        if($notice->reply_to){
-                $user = User::staticGet('id',$notice->reply_to);
+        foreach ($replies as $recipient) {
+                $user = User::staticGet('id',$recipient);
+            if (!empty($user)) {
                 $feeds[]=common_local_url('ApiTimelineMentions',array('id' => $user->nickname,'format'=>'rss'));
                 $feeds[]=common_local_url('ApiTimelineMentions',array('id' => $user->nickname,'format'=>'atom'));
+            }
         }
 
         foreach(array_unique($feeds) as $feed){