- if (!empty($this->notice->reply_to)) {
- $replyTo = Notice::staticGet('id', $this->notice->reply_to);
- if (!empty($replyTo)) {
- foreach($replyTo->getReplies() as $profile_id) {
- $oprofile = Ostatus_profile::staticGet('profile_id', $profile_id);
- if ($oprofile) {
- $this->pingReply($oprofile);
+ if ($notice->isLocal()) {
+ // Notices generated on other sites will have already
+ // pinged their reply-targets.
+
+ foreach ($notice->getReplies() as $profile_id) {
+ $oprofile = Ostatus_profile::getKV('profile_id', $profile_id);
+ if ($oprofile) {
+ $this->pingReply($oprofile);
+ }
+ }
+
+ if (!empty($this->notice->reply_to)) {
+ $replyTo = Notice::getKV('id', $this->notice->reply_to);
+ if (!empty($replyTo)) {
+ foreach($replyTo->getReplies() as $profile_id) {
+ $oprofile = Ostatus_profile::getKV('profile_id', $profile_id);
+ if ($oprofile) {
+ $this->pingReply($oprofile);
+ }