aboutsummaryrefslogtreecommitdiffstats
path: root/mod/receive.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/receive.php')
-rw-r--r--mod/receive.php29
1 files changed, 1 insertions, 28 deletions
diff --git a/mod/receive.php b/mod/receive.php
index b50774933..34128518b 100644
--- a/mod/receive.php
+++ b/mod/receive.php
@@ -15,8 +15,6 @@ function receive_post(&$a) {
if($a->argc != 3 || $a->argv[1] !== 'users')
http_status_exit(500);
- logger('receive: raw input: ' . file_get_contents('php://input'), LOGGER_DATA);
-
$guid = $a->argv[2];
$r = q("SELECT * FROM `user` WHERE `guid` = '%s' LIMIT 1",
@@ -43,32 +41,7 @@ function receive_post(&$a) {
if(! is_array($msg))
http_status_exit(500);
-
- $parsed_xml = parse_xml_string($msg['message'],false);
-
- $xmlbase = $parsed_xml->post;
-
- if($xmlbase->request) {
- diaspora_request($importer,$xmlbase->request);
- }
- elseif($xmlbase->status_message) {
- diaspora_post($importer,$xmlbase->status_message);
- }
- elseif($xmlbase->comment) {
- diaspora_comment($importer,$xmlbase->comment,$msg);
- }
- elseif($xmlbase->like) {
- diaspora_like($importer,$xmlbase->like,$msg);
- }
- elseif($xmlbase->retraction) {
- diaspora_retraction($importer,$xmlbase->retraction,$msg);
- }
- elseif($xmlbase->photo) {
- diaspora_photo($importer,$xmlbase->photo,$msg);
- }
- else {
- logger('mod-diaspora: unknown message type: ' . print_r($xmlbase,true));
- }
+ diaspora_dispatch($importer,$msg);
http_status_exit(200);
// NOTREACHED