]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/classes/HubSub.php
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / plugins / OStatus / classes / HubSub.php
index eae2928c329fcb0dfb58c1357443461f80e98050..3120a70f9fb39dd978c14482c59b79ed90abbbc4 100644 (file)
@@ -99,7 +99,7 @@ class HubSub extends Memcached_DataObject
         return array_keys($this->keyTypes());
     }
 
-    function sequenceKeys()
+    function sequenceKey()
     {
         return array(false, false, false);
     }
@@ -164,7 +164,7 @@ class HubSub extends Memcached_DataObject
                       'token' => $token,
                       'retries' => $retries);
         $qm = QueueManager::get();
-        $qm->enqueue($data, 'hubverify');
+        $qm->enqueue($data, 'hubconf');
     }
 
     /**
@@ -260,9 +260,15 @@ class HubSub extends Memcached_DataObject
             $retries = intval(common_config('ostatus', 'hub_retries'));
         }
 
-        $data = array('sub' => clone($this),
+        // We dare not clone() as when the clone is discarded it'll
+        // destroy the result data for the parent query.
+        // @fixme use clone() again when it's safe to copy an
+        // individual item from a multi-item query again.
+        $sub = HubSub::staticGet($this->topic, $this->callback);
+        $data = array('sub' => $sub,
                       'atom' => $atom,
                       'retries' => $retries);
+        common_log(LOG_INFO, "Queuing PuSH: $this->topic to $this->callback");
         $qm = QueueManager::get();
         $qm->enqueue($data, 'hubout');
     }