aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-12-14 22:44:05 -0800
committerredmatrix <redmatrix@redmatrix.me>2015-12-14 22:44:05 -0800
commitb13241564b994762e5c1a4747f74acc6cd27adf5 (patch)
tree3d01d7a2307075b4db29f1b23c85bfcdbf5637ec /include/notifier.php
parent76816de3aae832d68be6d8f2b32ff7b910792002 (diff)
downloadvolse-hubzilla-b13241564b994762e5c1a4747f74acc6cd27adf5.tar.gz
volse-hubzilla-b13241564b994762e5c1a4747f74acc6cd27adf5.tar.bz2
volse-hubzilla-b13241564b994762e5c1a4747f74acc6cd27adf5.zip
more work on queue api
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php21
1 files changed, 7 insertions, 14 deletions
diff --git a/include/notifier.php b/include/notifier.php
index 6ff2666bb..c5c1ec75b 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -159,23 +159,16 @@ function notifier_run($argv, $argc){
));
if($data) {
$hash = random_string();
- q("insert into outq ( outq_hash, outq_account, outq_channel, outq_driver, outq_posturl, outq_async, outq_created, outq_updated, outq_notify, outq_msg )
- values ( '%s', %d, %d, '%s', '%s', %d, '%s', '%s', '%s', '%s' )",
- dbesc($hash),
- intval($s[0]['channel_account_id']),
- intval($s[0]['channel_id']),
- dbesc('zot'),
- dbesc($hh['hubloc_callback']),
- intval(1),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
- dbesc($data),
- dbesc('')
- );
+ queue_insert(array(
+ 'hash' => $hash,
+ 'account_id' => $s[0]['channel_account_id'],
+ 'channel_id' => $s[0]['channel_id'],
+ 'posturl' => $hh['hubloc_callback'],
+ 'notify' => $data,
+ ));
$deliveries[] = $hash;
}
}
-
}
}