From 194ef02c287edbce6b797f1411afe0bb964e8c80 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 19 Nov 2012 16:51:15 -0800 Subject: DATABASE: outq additions, delivery now getting the notify across to the other side --- include/notifier.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include/notifier.php') 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), -- cgit v1.2.3