check that we have valid data

This commit is contained in:
friendica 2014-11-01 01:52:27 -07:00
parent 1eacea4037
commit 50c16c394f
2 changed files with 17 additions and 10 deletions

View File

@ -2813,6 +2813,7 @@ function import_author_zot($x) {
function zot_process_message_request($data) {
$ret = array('success' => false);
// note: disabled until the loops stop.
return $ret;
if(! $data['message_id']) {

View File

@ -598,12 +598,17 @@ function post_post(&$a) {
$ret['success'] = true;
$ret['pickup'] = array();
foreach($r as $rr) {
if($rr['outq_msg']) {
$x = json_decode($rr['outq_msg'],true);
if(! $x)
continue;
if(array_key_exists('message_list',$x)) {
foreach($x['message_list'] as $xx)
foreach($x['message_list'] as $xx) {
$ret['pickup'][] = array('notify' => json_decode($rr['outq_notify'],true),'message' => $xx);
}
}
else
$ret['pickup'][] = array('notify' => json_decode($rr['outq_notify'],true),'message' => $x);
@ -612,6 +617,7 @@ function post_post(&$a) {
);
}
}
}
$encrypted = crypto_encapsulate(json_encode($ret),$sitekey);
json_return_and_die($encrypted);