8 use Friendica\Database\DBM;
11 require_once 'include/crypto.php';
12 // not yet ready for prime time
13 //require_once('include/zot.php');
16 * @param object $a App
19 function post_post(App $a)
21 $bulk_delivery = false;
24 $bulk_delivery = true;
26 $nickname = $a->argv[2];
27 $r = dba::select('user', array(), array('nickname' => $nickname, 'account_expired' => 0, 'account_removed' => 0), array('limit' => 1));
28 if (! DBM::is_result($r)) {
29 http_status_exit(500);
35 $xml = file_get_contents('php://input');
37 logger('mod-post: new zot: ' . $xml, LOGGER_DATA);
40 http_status_exit(500);
43 $msg = zot_decode($importer, $xml);
45 logger('mod-post: decoded msg: ' . print_r($msg, true), LOGGER_DATA);
47 if (! is_array($msg)) {
48 http_status_exit(500);
52 $ret = zot_incoming($bulk_delivery, $importer, $msg);
53 http_status_exit(($ret) ? $ret : 200);