From 6f968f2da11db5b1d5f44ac9f4a4d58bb9eb402d Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 4 Sep 2018 12:39:09 -0600 Subject: [PATCH] Defer handling of Add, Remove, and Undo --- inc/outbox.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/inc/outbox.php b/inc/outbox.php index e58c205..18b2b0f 100644 --- a/inc/outbox.php +++ b/inc/outbox.php @@ -43,8 +43,18 @@ function handle_activity( $actor, $activity ) { $activity = \activities\follow\handle( $actor, $activity ); break; case 'Add': + return new \WP_Error( + 'not_implemented', + __( 'The Add activity has not been implemented', 'activitypub' ), + array( 'status' => 501 ) + ); break; case 'Remove': + return new \WP_Error( + 'not_implemented', + __( 'The Remove activity has not been implemented', 'activitypub' ), + array( 'status' => 501 ) + ); break; case 'Like': $activity = \activities\like\handle( $actor, $activity ); @@ -53,6 +63,11 @@ function handle_activity( $actor, $activity ) { $activity = \activities\block\handle( $actor, $activity ); break; case 'Undo': + return new \WP_Error( + 'not_implemented', + __( 'The Undo activity has not been implemented', 'activitypub' ), + array( 'status' => 501 ) + ); break; default: // handle wrapping object in Create activity