aboutsummaryrefslogtreecommitdiffstats
path: root/mod/receive.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-16 22:31:14 -0700
committerFriendika <info@friendika.com>2011-08-16 22:31:14 -0700
commit673e114bbd6666ffe9350613284e813a38c5f0d7 (patch)
treeccdcf49ac9557ead6a9dd195e3fd383aa6c1b9fb /mod/receive.php
parentfafcab70e1e56327ef39f22ccd915f41b75b81f2 (diff)
downloadvolse-hubzilla-673e114bbd6666ffe9350613284e813a38c5f0d7.tar.gz
volse-hubzilla-673e114bbd6666ffe9350613284e813a38c5f0d7.tar.bz2
volse-hubzilla-673e114bbd6666ffe9350613284e813a38c5f0d7.zip
D* like and start of relay code
Diffstat (limited to 'mod/receive.php')
-rw-r--r--mod/receive.php12
1 files changed, 6 insertions, 6 deletions
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));