diff --git a/classes/Notice.php b/classes/Notice.php index ada4d495d2..bcd84501ec 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -1309,6 +1309,26 @@ class Notice extends Memcached_DataObject return $ids; } + /** + * Pull the complete list of @-reply targets for this notice. + * + * @return array of Profiles + */ + function getReplyProfiles() + { + $ids = $this->getReplies(); + $profiles = array(); + + foreach ($ids as $id) { + $profile = Profile::staticGet('id', $id); + if (!empty($profile)) { + $profiles[] = $profile; + } + } + + return $profiles; + } + /** * Send e-mail notifications to local @-reply targets. *