utility method to get reply profiles for a notice
This commit is contained in:
parent
b3e7838552
commit
5135043b84
@ -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.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user