8 use Friendica\Database\DBM;
10 require_once('include/salmon.php');
11 require_once('include/crypto.php');
12 // not yet ready for prime time
13 //require_once('include/zot.php');
15 function post_post(App $a) {
17 $bulk_delivery = false;
20 $bulk_delivery = true;
23 $nickname = $a->argv[2];
24 $r = q("SELECT * FROM `user` WHERE `nickname` = '%s'
25 AND `account_expired` = 0 AND `account_removed` = 0 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);
42 $msg = zot_decode($importer,$xml);
44 logger('mod-post: decoded msg: ' . print_r($msg,true), LOGGER_DATA);
47 http_status_exit(500);
50 $ret = zot_incoming($bulk_delivery, $importer,$msg);
51 http_status_exit(($ret) ? $ret : 200);