aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-27 03:08:26 -0800
committerfriendica <info@friendica.com>2012-11-27 03:08:26 -0800
commitf3fdbb6021bd2e20f728149e7534ffdaadbfda36 (patch)
tree1f1fef9df782204c5f69f448b325808ee56d6f55
parente916d71cc5c92613fb69f4aeead817bf5bb1c2fc (diff)
downloadvolse-hubzilla-f3fdbb6021bd2e20f728149e7534ffdaadbfda36.tar.gz
volse-hubzilla-f3fdbb6021bd2e20f728149e7534ffdaadbfda36.tar.bz2
volse-hubzilla-f3fdbb6021bd2e20f728149e7534ffdaadbfda36.zip
tracking through comments
-rw-r--r--include/notifier.php12
-rw-r--r--include/zot.php4
2 files changed, 12 insertions, 4 deletions
diff --git a/include/notifier.php b/include/notifier.php
index 6a70bd738..b4ccf69cc 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -168,15 +168,16 @@ function notifier_run($argv, $argc){
// Normal items
// Fetch the target item
-
+dbg(1);
$r = q("SELECT * FROM item WHERE id = %d and parent != 0 LIMIT 1",
intval($item_id)
);
if(! $r)
return;
-
+logger('notify1');
xchan_query($r);
+dbg(0);
$r = fetch_post_tags($r);
$target_item = $r[0];
@@ -187,6 +188,7 @@ function notifier_run($argv, $argc){
if($s)
$channel = $s[0];
+logger('notify2');
if($target_item['id'] == $target_item['parent']) {
$parent_item = $target_item;
$top_level_post = true;
@@ -194,8 +196,11 @@ function notifier_run($argv, $argc){
else {
// fetch the parent item
$r = q("SELECT * from item where id = %d order by id asc",
- intval($parent_id)
+ intval($target_item['parent'])
);
+
+logger('notify3');
+
if(! $r)
return;
xchan_query($r);
@@ -204,6 +209,7 @@ function notifier_run($argv, $argc){
$parent_item = $r[0];
$top_level_post = false;
}
+logger('notify4');
$encoded_item = encode_item($target_item);
diff --git a/include/zot.php b/include/zot.php
index aceee5f71..654b17353 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -108,10 +108,12 @@ function zot_build_packet($channel,$type = 'notify',$recipients = null, $remote_
if($secret)
$data['secret'] = $secret;
+ logger('zot_build_packet: ' . print_r($data,true));
+
// Hush-hush ultra top-secret mode
if($remote_key) {
- $data = aes_encapsulate($data,$remote_key);
+ $data = aes_encapsulate(json_encode($data),$remote_key);
}
return json_encode($data);