utility method to get reply profiles for a notice

This commit is contained in:
Evan Prodromou 2011-04-16 15:17:03 -04:00
parent b3e7838552
commit 5135043b84

View File

@ -1309,6 +1309,26 @@ class Notice extends Memcached_DataObject
return $ids; 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. * Send e-mail notifications to local @-reply targets.
* *