- foreach ($notice->getProfileTags() as $ptag) {
- $oprofile = Ostatus_profile::staticGet('peopletag_id', $ptag->id);
- if (!$oprofile) {
- $this->pushPeopletag($ptag);
+ if ($notice->isLocal()) {
+ try {
+ $parent = $this->notice->getParent();
+ foreach($parent->getAttentionProfiles() as $related) {
+ if ($related->isGroup()) {
+ // don't ping groups in parent notices since we might not be a member of them,
+ // though it could be useful if we study this and use it correctly
+ continue;
+ }
+ common_debug("OSTATUS [{$this->notice->getID()}]: parent notice {$parent->getID()} has related profile id=={$related->getID()}");
+ // FIXME: don't ping twice in case someone is in both notice attention spans!
+ $oprofile = Ostatus_profile::getKV('profile_id', $related->getID());
+ if ($oprofile instanceof Ostatus_profile) {
+ $this->pingReply($oprofile);
+ }
+ }
+ } catch (NoParentNoticeException $e) {
+ // nothing to do then
+ }
+
+ foreach ($notice->getProfileTags() as $ptag) {
+ $oprofile = Ostatus_profile::getKV('peopletag_id', $ptag->id);
+ if (!$oprofile) {
+ $this->pushPeopletag($ptag);
+ }