[ActivityPub] Inbox Handler: Remove old guzzle import

Improve exception information in doc blocks
This commit is contained in:
Diogo Cordeiro 2019-10-11 17:18:29 +01:00 committed by Diogo Peralta Cordeiro
parent 174733edc8
commit 48eee0e018

View File

@ -70,8 +70,8 @@ class Activitypub_inbox_handler
/**
* Validates if a given Activity is valid. Throws exception if not.
*
* @author Diogo Cordeiro <diogo@fc.up.pt>
* @throws Exception
* @author Diogo Cordeiro <diogo@fc.up.pt>
*/
private function validate_activity()
{
@ -116,6 +116,11 @@ class Activitypub_inbox_handler
/**
* Sends the Activity to proper handler in order to be processed.
*
* @throws AlreadyFulfilledException
* @throws HTTP_Request2_Exception
* @throws NoProfileException
* @throws ServerException
* @throws Exception
* @author Diogo Cordeiro <diogo@fc.up.pt>
*/
private function process()
@ -168,6 +173,7 @@ class Activitypub_inbox_handler
* @throws HTTP_Request2_Exception
* @throws NoProfileException
* @throws ServerException
* @throws Exception
* @author Diogo Cordeiro <diogo@fc.up.pt>
*/
private function handle_accept_follow()
@ -202,6 +208,7 @@ class Activitypub_inbox_handler
/**
* Handle a Create Note Activity received by our inbox.
*
* @throws Exception
* @author Bruno Casteleiro <brunoccast@fc.up.pt>
*/
private function handle_create_note()
@ -216,7 +223,7 @@ class Activitypub_inbox_handler
/**
* Handles a Delete Activity received by our inbox.
*
* @throws AuthorizationException
* @throws NoProfileException
* @author Diogo Cordeiro <diogo@fc.up.pt>
*/
private function handle_delete()
@ -256,6 +263,7 @@ class Activitypub_inbox_handler
*
* @param Activitypub_profile $aprofile remote user being deleted
* @return void
* @throws NoProfileException
* @author Bruno Casteleiro <brunoccast@fc.up.pt>
*/
private function handle_delete_profile(Activitypub_profile $aprofile): void
@ -269,6 +277,7 @@ class Activitypub_inbox_handler
*
* @param Notice $note remote note being deleted
* @return void
* @throws AuthorizationException
* @author Bruno Casteleiro <brunoccast@fc.up.pt>
*/
private function handle_delete_note(Notice $note): void
@ -283,8 +292,6 @@ class Activitypub_inbox_handler
* @throws HTTP_Request2_Exception
* @throws NoProfileException
* @throws ServerException
* @throws \GuzzleHttp\Exception\GuzzleException
* @throws \HttpSignatures\Exception
* @author Diogo Cordeiro <diogo@fc.up.pt>
*/
private function handle_follow()
@ -332,6 +339,7 @@ class Activitypub_inbox_handler
* @throws HTTP_Request2_Exception
* @throws NoProfileException
* @throws ServerException
* @throws Exception
* @author Diogo Cordeiro <diogo@fc.up.pt>
*/
private function handle_undo_follow()
@ -344,9 +352,9 @@ class Activitypub_inbox_handler
Subscription::cancel($this->actor, $object_profile);
// You are no longer following this person.
Activitypub_profile::unsubscribeCacheUpdate($this->actor, $object_profile);
} else {
// 409: You are not following this person already.
}
} /*else {
// 409: You already aren't following this person.
}*/
}
/**
@ -354,6 +362,7 @@ class Activitypub_inbox_handler
*
* @throws AlreadyFulfilledException
* @throws ServerException
* @throws Exception
* @author Diogo Cordeiro <diogo@fc.up.pt>
*/
private function handle_undo_like()