diff options
Diffstat (limited to 'mod/post.php')
-rw-r--r-- | mod/post.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mod/post.php b/mod/post.php index 847af0fe9..70dd4dc19 100644 --- a/mod/post.php +++ b/mod/post.php @@ -175,6 +175,19 @@ function post_post(&$a) { $msgtype = ((array_key_exists('type',$data)) ? $data['type'] : ''); + if($msgtype === 'ping') { + + // Useful to get a health check on a remote site. + // This will let us know if any important communication details + // that we may have stored are no longer valid, regardless of xchan details. + + $ret['success'] = true; + $ret['site'] = array(); + $ret['site']['url'] = z_root(); + $ret['site']['url_sig'] = base64url_encode(rsa_sign(z_root(),get_config('system','prvkey'))); + $ret['site']['sitekey'] = get_config('system','pubkey'); + json_return_and_die($ret); + } if($msgtype === 'pickup') { |