Commit 5135043b authored by Evan Prodromou's avatar Evan Prodromou

utility method to get reply profiles for a notice

parent b3e78385
......@@ -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.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment