Just some more centralised functionality

This commit is contained in:
Michael Vogel 2016-06-30 07:46:00 +02:00
parent 99f0746660
commit d125939888
3 changed files with 17 additions and 11 deletions

View file

@ -35,16 +35,11 @@ function fetch_init($a){
$user = $r[0];
$status = diaspora::build_status($item[0], $user);
$data = array("XML" => array("post" => array($status["type"] => $status["message"])));
$xml = xml::from_array($data, $xmlobj);
$xml = diaspora::build_post_xml($status["type"], $status["message"]);
// Send the envelope
header("Content-Type: application/magic-envelope+xml; charset=utf-8");
echo diaspora::build_magic_envelope($xml, $user);
//header("Content-Type: application/xml; charset=utf-8");
//echo $xml;
//killme();
killme();
}