- elseif($xmlbase->signed_retraction) {
- //$tempfile = tempnam(get_temppath(), "diaspora-signed_retraction");
- //file_put_contents($tempfile, json_encode($data));
- $ret = diaspora_signed_retraction($importer,$xmlbase->signed_retraction,$msg);
- }
- elseif($xmlbase->relayable_retraction) {
- //$tempfile = tempnam(get_temppath(), "diaspora-relayable_retraction");
- //file_put_contents($tempfile, json_encode($data));
- $ret = diaspora_signed_retraction($importer,$xmlbase->relayable_retraction,$msg);
- }
- elseif($xmlbase->photo) {
- //$tempfile = tempnam(get_temppath(), "diaspora-photo");
- //file_put_contents($tempfile, json_encode($data));
- $ret = diaspora_photo($importer,$xmlbase->photo,$msg,$attempt);
- }
- elseif($xmlbase->conversation) {
- $tempfile = tempnam(get_temppath(), "diaspora-conversation");
- file_put_contents($tempfile, json_encode($data));
- $ret = diaspora_conversation($importer,$xmlbase->conversation,$msg);
- }
- elseif($xmlbase->message) {
- $tempfile = tempnam(get_temppath(), "diaspora-message");
- file_put_contents($tempfile, json_encode($data));
- $ret = diaspora_message($importer,$xmlbase->message,$msg);
- }
- elseif($xmlbase->participation) {
- //$tempfile = tempnam(get_temppath(), "diaspora-participation");
- //file_put_contents($tempfile, json_encode($data));
- $ret = diaspora_participation($importer,$xmlbase->participation);
- }
- elseif($xmlbase->poll_participation) {
- //$tempfile = tempnam(get_temppath(), "diaspora-poll_participation");
- //file_put_contents($tempfile, json_encode($data));
- $ret = diaspora_participation($importer,$xmlbase->poll_participation);
- }
- else {
- $tempfile = tempnam(get_temppath(), "diaspora-unknown");
- file_put_contents($tempfile, json_encode($data));
- logger('diaspora_dispatch: unknown message type: ' . print_r($xmlbase,true));
- }
- return $ret;
-}
-
-function diaspora_handle_from_contact($contact_id) {
- $handle = False;
-
- logger("diaspora_handle_from_contact: contact id is " . $contact_id, LOGGER_DEBUG);