Add some initial debug information for shared inbox

This commit is contained in:
Diogo Cordeiro 2018-07-31 20:16:23 +01:00
parent f8048c7565
commit f77bad0159
2 changed files with 6 additions and 2 deletions

View File

@ -55,6 +55,10 @@ class apSharedInboxAction extends ManagedAction
ActivityPubReturn::error("Only POST requests allowed.");
}
common_debug('ActivityPub Shared Inbox: Received a POST request.');
$data = file_get_contents('php://input');
common_debug('ActivityPub Shared Inbox: Request contents: '.$data);
$data = json_decode(file_get_contents('php://input'));
// Validate data

View File

@ -55,7 +55,7 @@ class Activitypub_explorer
*/
public function lookup($url)
{
common_debug("Explorer started now looking for ".$url);
common_debug('ActivityPub Explorer: Started now looking for '.$url);
$this->discovered_actor_profiles = array();
return $this->_lookup($url);
@ -75,7 +75,7 @@ class Activitypub_explorer
// First check if we already have it locally and, if so, return it
// If the local fetch fails: grab it remotely, store locally and return
if (! ($this->grab_local_user($url) || $this->grab_remote_user($url))) {
throw new Exception("User not found.");
throw new Exception('User not found.');
}
return $this->discovered_actor_profiles;