From 673e114bbd6666ffe9350613284e813a38c5f0d7 Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 16 Aug 2011 22:31:14 -0700 Subject: D* like and start of relay code --- mod/receive.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mod/receive.php') diff --git a/mod/receive.php b/mod/receive.php index 1a99a9aed..19c163967 100644 --- a/mod/receive.php +++ b/mod/receive.php @@ -36,13 +36,13 @@ function receive_post(&$a) { $msg = diaspora_decode($importer,$xml); - logger('mod-diaspora: decoded msg: ' . $msg, LOGGER_DATA); + logger('mod-diaspora: decoded msg: ' . print_r($msg,true), LOGGER_DATA); - if(! $msg) + if(! is_array($msg)) http_status_exit(500); - $parsed_xml = parse_xml_string($msg,false); + $parsed_xml = parse_xml_string($msg['message'],false); $xmlbase = $parsed_xml->post; @@ -53,13 +53,13 @@ function receive_post(&$a) { diaspora_post($importer,$xmlbase->status_message); } elseif($xmlbase->comment) { - diaspora_comment($importer,$xmlbase->comment); + diaspora_comment($importer,$xmlbase->comment,$msg); } elseif($xmlbase->like) { - diaspora_like($importer,$xmlbase->like); + diaspora_like($importer,$xmlbase->like,$msg); } elseif($xmlbase->retraction) { - diaspora_retraction($importer,$xmlbase->retraction); + diaspora_retraction($importer,$xmlbase->retraction,$msg); } else { logger('mod-diaspora: unknown message type: ' . print_r($xmlbase,true)); -- cgit v1.2.3