summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-04-30 15:00:55 -0400
committerEvan Prodromou <evan@status.net>2010-04-30 15:00:55 -0400
commit3f2c805652cd641f82af41cd5f92cb54d0457a59 (patch)
treeead13aee17392f4fa9f03ba61ab30ba3b247ee2e /classes/Notice.php
parent50bfa218141a30c5041957aae60b9be78fe74950 (diff)
parentecfe6b89443227854c057bb45b107368b860ad02 (diff)
Merge branch 'master' of gitorious.org:statusnet/mainline
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index c4a316888..0b1b2e402 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -702,6 +702,27 @@ class Notice extends Memcached_DataObject
}
/**
+ * Is this notice part of an active conversation?
+ *
+ * @return boolean true if other messages exist in the same
+ * conversation, false if this is the only one
+ */
+ function hasConversation()
+ {
+ if (!empty($this->conversation)) {
+ $conversation = Notice::conversationStream(
+ $this->conversation,
+ 1,
+ 1
+ );
+ if ($conversation->N > 0) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
* @param $groups array of Group *objects*
* @param $recipients array of profile *ids*
*/