Description
Comments on ActivityPub posts (ap_post custom post type) are not being filtered out from the core REST API results. This causes them to appear in mobile apps that use the WordPress REST API.
Expected behavior
Comments on internal ActivityPub post types should be filtered from the REST API comments endpoint, similar to how the posts themselves are excluded.
Steps to reproduce
- Have ActivityPub posts with comments in the database
- Query the comments REST API endpoint
- Comments on
ap_post type posts appear in the results
- These show up in mobile apps
Additional context
The ap_post custom post type is internal to the ActivityPub plugin and should not be exposed through the standard WordPress REST API.