summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
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 a8147e4c4..0d8525637 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*
*/