Skip to content

Add v2/filters and v2/notifications/policy endpoint stubs#288

Merged
akirk merged 2 commits intomainfrom
fix/v2-endpoint-stubs
Mar 26, 2026
Merged

Add v2/filters and v2/notifications/policy endpoint stubs#288
akirk merged 2 commits intomainfrom
fix/v2-endpoint-stubs

Conversation

@akirk
Copy link
Copy Markdown
Owner

@akirk akirk commented Mar 26, 2026

Summary

  • Adds stub endpoints for GET /api/v2/filters (returns []) and GET /api/v2/notifications/policy (returns default "accept all" policy)
  • Apps like Mastodon for iOS and Ivory request these v2 endpoints, which currently return a full WordPress HTML 404 page instead of JSON, crashing the apps with "The data couldn't be read because it isn't in the correct format"

Fixes #286 (Problem 2)

Test plan

  • Verify GET /api/v2/filters returns [] with proper JSON content type
  • Verify GET /api/v2/notifications/policy returns the default policy JSON
  • Test with Mastodon for iOS / Ivory that notifications load without crashing

akirk added 2 commits March 26, 2026 09:19
Apps like Mastodon for iOS and Ivory request these v2 endpoints, which
returned WordPress HTML 404 pages instead of JSON, crashing the apps.

- v2/filters returns an empty array (matching v1/filters behavior)
- v2/notifications/policy returns a default "accept all" policy
@akirk akirk merged commit f71d16f into main Mar 26, 2026
17 checks passed
@akirk akirk deleted the fix/v2-endpoint-stubs branch March 26, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mastodon for iOS / Ivory → wp-admin redirect + v2 endpoint JSON crash

1 participant