diff --git a/inc/activities/create.php b/inc/activities/create.php new file mode 100644 index 0000000..f44893a --- /dev/null +++ b/inc/activities/create.php @@ -0,0 +1,50 @@ + diff --git a/inc/outbox.php b/inc/outbox.php index e8f6119..a03f34f 100644 --- a/inc/outbox.php +++ b/inc/outbox.php @@ -46,7 +46,9 @@ function persist_activity( $actor, $activity ) { function handle_activity( $actor, $activity ) { if ( !array_key_exists( "type", $activity ) ) { return new WP_Error( - 'invalid_activity', 'Invalid activity', array( 'status' => 400 ) + 'invalid_activity', + __( 'Invalid activity', 'activitypub' ), + array( 'status' => 400 ) ); } switch ( $activity["type"] ) { @@ -68,6 +70,9 @@ function handle_activity( $actor, $activity ) { break; case "Undo": break; + default: + // handle wrapping object in Create activity + break; } } ?>