diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-12-07 16:01:54 -0800 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-12-07 16:01:54 -0800 |
commit | 8b974f8f74f6eefc5955a0f9e385f6460504fc42 (patch) | |
tree | f73a10571b7b0487aaa15a574fe8ea29a6dce225 /include | |
parent | 53627c89a716fcd9bac535169710e65b229e96a5 (diff) | |
download | volse-hubzilla-8b974f8f74f6eefc5955a0f9e385f6460504fc42.tar.gz volse-hubzilla-8b974f8f74f6eefc5955a0f9e385f6460504fc42.tar.bz2 volse-hubzilla-8b974f8f74f6eefc5955a0f9e385f6460504fc42.zip |
abstract the message handlers
Diffstat (limited to 'include')
-rw-r--r-- | include/zot.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/zot.php b/include/zot.php index 71c260d65..68b19c3a8 100644 --- a/include/zot.php +++ b/include/zot.php @@ -3494,13 +3494,13 @@ function import_author_zot($x) { * @param array $data * @return array */ -function zot_process_message_request($data) { +function zot_reply_message_request($data) { $ret = array('success' => false); if (! $data['message_id']) { $ret['message'] = 'no message_id'; logger('no message_id'); - return $ret; + json_return_and_die($ret); } $sender = $data['sender']; @@ -3518,7 +3518,7 @@ function zot_process_message_request($data) { if (! $c) { logger('recipient channel not found.'); $ret['message'] .= 'recipient not found.' . EOL; - return $ret; + json_return_and_die($ret); } /* @@ -3536,7 +3536,7 @@ function zot_process_message_request($data) { ); if (! $r) { logger('no hubs'); - return $ret; + json_return_and_die($ret); } $hubs = $r; @@ -3577,8 +3577,7 @@ function zot_process_message_request($data) { } } $ret['success'] = true; - - return $ret; + json_return_and_die($ret); } |