]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Conversation.php
More Favorite pluginification (favecount, cache, menus(favecount, cache, menus))
[quix0rs-gnu-social.git] / classes / Conversation.php
index faca20f9c6e515bef0a2549da243f791def6eb9b..3acc283d62a2eb4ddce6c77206aaed4ff246c933 100755 (executable)
@@ -121,4 +121,15 @@ class Conversation extends Managed_DataObject
         return common_local_url('conversation', array('id' => $this->id)) .
                 ($noticeId===null ? '' : "#notice-{$noticeId}");
     }
+
+    // FIXME: ...will 500 ever be too low? Taken from ConversationAction::MAX_NOTICES
+    public function getNotices($offset=0, $limit=500, Profile $scoped=null)
+    {
+        if ($scoped === null) {
+            $scoped = Profile::current();
+        }
+        $stream = new ConversationNoticeStream($this->id, $scoped);
+        $notices = $stream->getNotices($offset, $limit);
+        return $notices;
+    }
 }