starting to get into the hairy parts of zot - identity, location, and permission synchronisation. After this, messaging should be a piece of cake.
This commit is contained in:
35
mod/post.php
35
mod/post.php
@@ -13,18 +13,33 @@ function post_post(&$a) {
|
||||
|
||||
$msgtype = ((x($_REQUEST,'type')) ? $_REQUEST['type'] : '');
|
||||
|
||||
$hub = zot_gethub($_REQUEST);
|
||||
if(! $hub) {
|
||||
$result = zot_register_hub($_REQUEST);
|
||||
if((! $result) || (! zot_gethub($_REQUEST))) {
|
||||
$ret['message'] = 'Hub not available.';
|
||||
json_return_and_die($ret);
|
||||
}
|
||||
}
|
||||
|
||||
// check which hub is primary and take action if mismatched
|
||||
|
||||
|
||||
if($msgtype === 'refresh') {
|
||||
|
||||
// Need to pass the recipient in the message
|
||||
|
||||
// look up recipient
|
||||
|
||||
// format args
|
||||
// $r = zot_refresh($them,$channel);
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if($msgtype === 'notify') {
|
||||
|
||||
$hub = zot_gethub($_REQUEST);
|
||||
if(! $hub) {
|
||||
$result = zot_register_hub($_REQUEST);
|
||||
if((! $result) || (! zot_gethub($_REQUEST))) {
|
||||
$ret['message'] = 'Hub not available.';
|
||||
json_return_and_die($ret);
|
||||
}
|
||||
}
|
||||
|
||||
// check which hub is primary and take action if mismatched
|
||||
|
||||
// add to receive queue
|
||||
// qreceive_add($_REQUEST);
|
||||
|
||||
Reference in New Issue
Block a user