]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/lib/ostatusqueuehandler.php
send a salmon slap to mentioned person when we reply to a notice
[quix0rs-gnu-social.git] / plugins / OStatus / lib / ostatusqueuehandler.php
index 8905d2e21069f22851c81c208b20ba650fbc2fd6..5e318116a6e1a3d479d5ffd379cb655a71009be7 100644 (file)
@@ -67,6 +67,17 @@ class OStatusQueueHandler extends QueueHandler
             }
         }
 
+        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);
+                    }
+                }
+            }
+        }
         return true;
     }
 
@@ -161,7 +172,7 @@ class OStatusQueueHandler extends QueueHandler
      * Queue up direct feed update pushes to subscribers on our internal hub.
      * If there are a large number of subscriber sites, intermediate bulk
      * distribution triggers may be queued.
-     * 
+     *
      * @param string $atom update feed, containing only new/changed items
      * @param HubSub $sub open query of subscribers
      */