tracking through comments
This commit is contained in:
parent
e916d71cc5
commit
f3fdbb6021
@ -168,15 +168,16 @@ function notifier_run($argv, $argc){
|
|||||||
// Normal items
|
// Normal items
|
||||||
|
|
||||||
// Fetch the target item
|
// Fetch the target item
|
||||||
|
dbg(1);
|
||||||
$r = q("SELECT * FROM item WHERE id = %d and parent != 0 LIMIT 1",
|
$r = q("SELECT * FROM item WHERE id = %d and parent != 0 LIMIT 1",
|
||||||
intval($item_id)
|
intval($item_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
if(! $r)
|
if(! $r)
|
||||||
return;
|
return;
|
||||||
|
logger('notify1');
|
||||||
xchan_query($r);
|
xchan_query($r);
|
||||||
|
dbg(0);
|
||||||
$r = fetch_post_tags($r);
|
$r = fetch_post_tags($r);
|
||||||
|
|
||||||
$target_item = $r[0];
|
$target_item = $r[0];
|
||||||
@ -187,6 +188,7 @@ function notifier_run($argv, $argc){
|
|||||||
if($s)
|
if($s)
|
||||||
$channel = $s[0];
|
$channel = $s[0];
|
||||||
|
|
||||||
|
logger('notify2');
|
||||||
if($target_item['id'] == $target_item['parent']) {
|
if($target_item['id'] == $target_item['parent']) {
|
||||||
$parent_item = $target_item;
|
$parent_item = $target_item;
|
||||||
$top_level_post = true;
|
$top_level_post = true;
|
||||||
@ -194,8 +196,11 @@ function notifier_run($argv, $argc){
|
|||||||
else {
|
else {
|
||||||
// fetch the parent item
|
// fetch the parent item
|
||||||
$r = q("SELECT * from item where id = %d order by id asc",
|
$r = q("SELECT * from item where id = %d order by id asc",
|
||||||
intval($parent_id)
|
intval($target_item['parent'])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
logger('notify3');
|
||||||
|
|
||||||
if(! $r)
|
if(! $r)
|
||||||
return;
|
return;
|
||||||
xchan_query($r);
|
xchan_query($r);
|
||||||
@ -204,6 +209,7 @@ function notifier_run($argv, $argc){
|
|||||||
$parent_item = $r[0];
|
$parent_item = $r[0];
|
||||||
$top_level_post = false;
|
$top_level_post = false;
|
||||||
}
|
}
|
||||||
|
logger('notify4');
|
||||||
|
|
||||||
$encoded_item = encode_item($target_item);
|
$encoded_item = encode_item($target_item);
|
||||||
|
|
||||||
|
@ -108,10 +108,12 @@ function zot_build_packet($channel,$type = 'notify',$recipients = null, $remote_
|
|||||||
if($secret)
|
if($secret)
|
||||||
$data['secret'] = $secret;
|
$data['secret'] = $secret;
|
||||||
|
|
||||||
|
logger('zot_build_packet: ' . print_r($data,true));
|
||||||
|
|
||||||
// Hush-hush ultra top-secret mode
|
// Hush-hush ultra top-secret mode
|
||||||
|
|
||||||
if($remote_key) {
|
if($remote_key) {
|
||||||
$data = aes_encapsulate($data,$remote_key);
|
$data = aes_encapsulate(json_encode($data),$remote_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return json_encode($data);
|
return json_encode($data);
|
||||||
|
Reference in New Issue
Block a user