]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
StompQueueManager uses decode() to decode queued frames
authorCraig Andrews <candrews@integralblue.com>
Fri, 22 Jan 2010 23:02:05 +0000 (18:02 -0500)
committerCraig Andrews <candrews@integralblue.com>
Fri, 22 Jan 2010 23:02:05 +0000 (18:02 -0500)
lib/stompqueuemanager.php

index 8f0091a1384f51b1cf07ad6c4bddf7dfbd920f03..4bbdeedc20d6cb1d17c2a4e2c02d1c0884175e6a 100644 (file)
@@ -294,26 +294,7 @@ class StompQueueManager extends QueueManager
             StatusNet::init($site);
         }
 
-        if (is_numeric($frame->body)) {
-            $id = intval($frame->body);
-            $info = "notice $id posted at {$frame->headers['created']} in queue $queue";
-
-            $notice = Notice::staticGet('id', $id);
-            if (empty($notice)) {
-                $this->_log(LOG_WARNING, "Skipping missing $info");
-                $this->ack($frame);
-                $this->commit();
-                $this->begin();
-                $this->stats('badnotice', $queue);
-                return false;
-            }
-
-            $item = $notice;
-        } else {
-            // @fixme should we serialize, or json, or what here?
-            $info = "string posted at {$frame->headers['created']} in queue $queue";
-            $item = $frame->body;
-        }
+        $item = $this->decode($frame->body);
 
         $handler = $this->getHandler($queue);
         if (!$handler) {