*
* @return array of Profiles
*/
- function getReplyProfiles()
+ function getAttentionProfiles()
{
- $ids = $this->getReplies();
+ $ids = array_unique(array_merge($this->getReplies(), $this->getGroupProfileIDs()));
$profiles = Profile::multiGet('id', $ids);
}
}
+ /**
+ * Pull list of Profile IDs of groups this notice addresses.
+ *
+ * @return array of Group _profile_ IDs
+ */
+
+ function getGroupProfileIDs()
+ {
+ $ids = array();
+
+ foreach ($this->getGroups() as $group) {
+ $ids[] = $group->profile_id;
+ }
+
+ return $ids;
+ }
+
/**
* Pull list of groups this notice needs to be delivered to,
* as previously recorded by saveKnownGroups().
if($this->pa) { return $this->pa; }
$this->pa = array();
- $attentions = $this->getReplyProfiles();
+ $attentions = $this->getAttentionProfiles();
foreach ($attentions as $attn) {
$class = $attn->isGroup() ? 'group' : 'account';
return $this->pa;
}
- function getReplyProfiles()
+ function getAttentionProfiles()
{
- return $this->notice->getReplyProfiles();
+ return $this->notice->getAttentionProfiles();
}
/**
//
}
- function getReplyProfiles()
+ function getAttentionProfiles()
{
- $all = parent::getReplyProfiles();
+ $all = parent::getAttentionProfiles();
$profiles = array();