* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+if (!defined('STATUSNET')) {
+ exit(1);
+}
+
/**
* Prepare PuSH and Salmon distributions for an outgoing message.
*
}
}
- foreach ($notice->getReplies() as $profile_id) {
- $oprofile = Ostatus_profile::staticGet('profile_id', $profile_id);
- if ($oprofile) {
- $this->pingReply($oprofile);
- }
- }
-
if (!empty($this->notice->reply_to)) {
$replyTo = Notice::staticGet('id', $this->notice->reply_to);
if (!empty($replyTo)) {
}
}
}
+
+ foreach ($notice->getProfileTags() as $ptag) {
+ $oprofile = Ostatus_profile::staticGet('peopletag_id', $ptag->id);
+ if (!$oprofile) {
+ $this->pushPeopletag($ptag);
+ }
+ }
+
return true;
}
$this->pushFeed($feed, array($this, 'groupFeedForNotice'), $group_id);
}
+ function pushPeopletag($ptag)
+ {
+ // For a local people tag, ping the PuSH hub to update its feed.
+ // Updates may come from either a local or a remote user.
+ $feed = common_local_url('ApiTimelineList',
+ array('id' => $ptag->id,
+ 'user' => $ptag->tagger,
+ 'format' => 'atom'));
+ $this->pushFeed($feed, array($this, 'peopletagFeedForNotice'), $ptag);
+ }
+
function pingReply($oprofile)
{
if ($this->user) {
return $feed;
}
-}
+ function peopletagFeedForNotice($ptag)
+ {
+ $atom = new AtomListNoticeFeed($ptag);
+ $atom->addEntryFromNotice($this->notice);
+ $feed = $atom->getString();
+ return $feed;
+ }
+}