]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/lib/salmonqueuehandler.php
Introduced common_location_shared() to check if location sharing is always,
[quix0rs-gnu-social.git] / plugins / OStatus / lib / salmonqueuehandler.php
index aa97018dc9ac0c4fb048b3af3d144c40f5ef51eb..fbc03c3954d96bd5f1bb2665ff6ed397b7d70363 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+if (!defined('STATUSNET')) {
+    exit(1);
+}
+
 /**
  * Send a Salmon notification in the background.
  * @package OStatusPlugin
@@ -35,8 +39,10 @@ class SalmonQueueHandler extends QueueHandler
         assert(is_string($data['salmonuri']));
         assert(is_string($data['entry']));
 
-        $salmon = new Salmon();
-        $salmon->post($data['salmonuri'], $data['entry']);
+        $actor = Profile::getKV($data['actor']);
+        $target = array_key_exists('target', $data) ? Profile::getKV($data['target']) : null;
+
+        Salmon::post($data['salmonuri'], $data['entry'], $actor, $target);
 
         // @fixme detect failure and attempt to resend
         return true;