aboutsummaryrefslogtreecommitdiffstats
path: root/include/notifier.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-19 16:51:15 -0800
committerfriendica <info@friendica.com>2012-11-19 16:51:15 -0800
commit194ef02c287edbce6b797f1411afe0bb964e8c80 (patch)
treecfb80e3bc0cb356952e2ac8d1320d1cb72ff5fd3 /include/notifier.php
parentdb77309bc399669c5c98f4fac99f2d5f96cfbaeb (diff)
downloadvolse-hubzilla-194ef02c287edbce6b797f1411afe0bb964e8c80.tar.gz
volse-hubzilla-194ef02c287edbce6b797f1411afe0bb964e8c80.tar.bz2
volse-hubzilla-194ef02c287edbce6b797f1411afe0bb964e8c80.zip
DATABASE: outq additions, delivery now getting the notify across to the other side
Diffstat (limited to 'include/notifier.php')
-rw-r--r--include/notifier.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/notifier.php b/include/notifier.php
index f620af10a..6a70bd738 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -184,6 +184,8 @@ function notifier_run($argv, $argc){
$s = q("select * from channel where channel_id = %d limit 1",
intval($target_item['uid'])
);
+ if($s)
+ $channel = $s[0];
if($target_item['id'] == $target_item['parent']) {
$parent_item = $target_item;
@@ -261,12 +263,13 @@ function notifier_run($argv, $argc){
foreach($hubs as $hub) {
$hash = random_string();
- $n = zot_build_packet($channel,'notify',null,(($private) ? $hub['hubloc_sitekey'],$hash);
- q("insert into outq ( outq_hash, outq_account, outq_channel, outq_posturl, outq_created, outq_updated, outq_notify, outq_msg ) values ( '%s', %d, %d, '%s', '%s', '%s', '%s', '%s' )",
+ $n = zot_build_packet($channel,'notify',null,(($private) ? $hub['hubloc_sitekey'] : null),$hash);
+ q("insert into outq ( outq_hash, outq_account, outq_channel, outq_posturl, outq_async, outq_created, outq_updated, outq_notify, outq_msg ) values ( '%s', %d, %d, '%s', %d, '%s', '%s', '%s', '%s' )",
dbesc($hash),
intval($target_item['aid']),
intval($target_item['uid']),
dbesc($hub['hubloc_callback']),
+ intval(1),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc($n),