400 ) ); } forward_activity( $activity ); switch ( $activity['type'] ) { case 'Create': break; case 'Update': break; case 'Delete': break; case 'Follow': break; case 'Accept': break; case 'Reject': break; case 'Add': break; case 'Remove': break; case 'Announce': break; case 'Undo': break; } if ( is_wp_error( $activity ) ) { return $activity; } persist_activity( $activity ); return new \WP_REST_Response(); } function forward_activity( $activity ) { } function persist_activity( $activity ) { } function create_inbox_table() { global $wpdb; $wpdb->query( " CREATE TABLE IF NOT EXISTS activitypub_inbox( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, actor_id UNSIGNED INT NOT NULL, activity_id INT UNSIGNED NOT NULL, FOREIGN KEY activity_fk(activity_id) REFERENCES activitypub_activities(id), ); " ); } ?>