aboutsummaryrefslogtreecommitdiff
path: root/classes/Conversation.php
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2014-05-12 10:27:52 +0200
committerMikael Nordfeldth <mmn@hethane.se>2014-05-12 11:03:21 +0200
commit1a811883556086b9a754d07b0dc996d3000dcbf1 (patch)
tree5bff959a80a92e59d531d8e38a3233ea95a0a1ab /classes/Conversation.php
parent4358ac0675ca19595ae650dfc2548eaa5f21782c (diff)
downloadgnu-social-1a811883556086b9a754d07b0dc996d3000dcbf1.tar
gnu-social-1a811883556086b9a754d07b0dc996d3000dcbf1.zip
Use an Event to present notices conversations
Diffstat (limited to 'classes/Conversation.php')
-rwxr-xr-xclasses/Conversation.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/classes/Conversation.php b/classes/Conversation.php
index faca20f9c6..3acc283d62 100755
--- a/classes/Conversation.php
+++ b/classes/Conversation.php
@@ -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;
+ }
}