]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
replace call to protected Ostatus_profile method
authorEvan Prodromou <evan@status.net>
Mon, 27 Dec 2010 05:38:28 +0000 (21:38 -0800)
committerEvan Prodromou <evan@status.net>
Mon, 27 Dec 2010 05:38:28 +0000 (21:38 -0800)
plugins/Bookmark/BookmarkPlugin.php

index f18c60c58679b6f2a00b4d1275a01e079472b791..99cfc1284e199a9494ebf80a0fe87c79ef3118c7 100644 (file)
@@ -505,8 +505,21 @@ class BookmarkPlugin extends Plugin
         }
 
         $replies = $activity->context->attention;
-        $options['groups'] = $author->filterReplies($author, $replies);
-        $options['replies'] = $replies;
+
+        $options['groups'] = array();
+        $options['replies'] = array();
+
+        foreach ($replies as $replyURI) {
+            $profile = Profile::fromURI($replyURI);
+            if (!empty($profile)) {
+                $options['replies'][] = $replyURI;
+            } else {
+                $group = User_group::staticGet('uri', $replyURI);
+                if (!empty($group)) {
+                    $options['groups'][] = $replyURI;
+                }
+            }
+        }
 
         // Maintain direct reply associations
         // @fixme what about conversation ID?