]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/distribqueuehandler.php
delete Twitter notice if it was posted from here
[quix0rs-gnu-social.git] / lib / distribqueuehandler.php
index c31b675c1a11a48a54b21cfc1cb444dfba4033b2..8f4b72d5c37e3128cb782aabea4475d0d1d88a14 100644 (file)
@@ -49,45 +49,30 @@ class DistribQueueHandler
     }
 
     /**
-     * Here's the meat of your queue handler -- you're handed a Notice
-     * object, which you may do as you will with.
+     * Handle distribution of a notice after we've saved it:
+     * @li add to local recipient inboxes
+     * @li send email notifications to local @-reply targets
+     * @li run final EndNoticeSave plugin events
+     * @li put any remaining post-processing into the queues
      *
      * If this function indicates failure, a warning will be logged
      * and the item is placed back in the queue to be re-run.
      *
+     * @fixme addToInboxes is known to fail sometimes with large recipient sets
+     *
      * @param Notice $notice
      * @return boolean true on success, false on failure
      */
     function handle($notice)
     {
-        // XXX: do we need to change this for remote users?
-
-        try {
-            $notice->saveTags();
-        } catch (Exception $e) {
-            $this->logit($notice, $e);
-        }
-
-        try {
-            $groups = $notice->saveGroups();
-        } catch (Exception $e) {
-            $this->logit($notice, $e);
-        }
-
-        try {
-            $recipients = $notice->getReplies();
-        } catch (Exception $e) {
-            $this->logit($notice, $e);
-        }
-
         try {
-            $notice->addToInboxes($groups, $recipients);
+            $notice->addToInboxes();
         } catch (Exception $e) {
             $this->logit($notice, $e);
         }
 
         try {
-            $notice->saveUrls();
+            $notice->sendReplyNotifications();
         } catch (Exception $e) {
             $this->logit($notice, $e);
         }