X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOStatus%2Flib%2Fostatusqueuehandler.php;h=d7dc921ad678e08969c9badbe44a13b50247e11a;hb=bf121a695a13c2b30abf57ea86afbe1e6c2420a7;hp=d5ee0c50417295a191f4ffa03542a30f8bda273a;hpb=aa02f6020e16f722d5194ad97e66a57ab1d8c29c;p=quix0rs-gnu-social.git diff --git a/plugins/OStatus/lib/ostatusqueuehandler.php b/plugins/OStatus/lib/ostatusqueuehandler.php index d5ee0c5041..d7dc921ad6 100644 --- a/plugins/OStatus/lib/ostatusqueuehandler.php +++ b/plugins/OStatus/lib/ostatusqueuehandler.php @@ -64,13 +64,6 @@ class OStatusQueueHandler extends QueueHandler } } - 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)) { @@ -82,6 +75,14 @@ class OStatusQueueHandler extends QueueHandler } } } + + foreach ($notice->getProfileTags() as $ptag) { + $oprofile = Ostatus_profile::staticGet('peopletag_id', $ptag->id); + if (!$oprofile) { + $this->pushPeopletag($ptag); + } + } + return true; } @@ -107,6 +108,17 @@ class OStatusQueueHandler extends QueueHandler $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) { @@ -225,4 +237,13 @@ class OStatusQueueHandler extends QueueHandler return $feed; } + + function peopletagFeedForNotice($ptag) + { + $atom = new AtomListNoticeFeed($ptag); + $atom->addEntryFromNotice($this->notice); + $feed = $atom->getString(); + + return $feed; + } }