Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] Make /api/v2/media more compatible with masto API #724

Merged
merged 5 commits into from
Jul 22, 2022

Conversation

tsmethurst
Copy link
Contributor

This PR tweaks the api model for a media attachment a little bit, to make some fields return null instead of empty strings.

In addition, it implements a workaround which nulls the URL field returned by /api/v2/media, in keeping with the mastodon API, which expects callers to just use the returned ID and preview URL rather than having the actual URL filled in already.

@tsmethurst tsmethurst force-pushed the api_v2_media_nullable_fields branch from 1a6ec8b to 4c5cd9e Compare July 22, 2022 10:08
@tsmethurst tsmethurst merged commit 73b8839 into main Jul 22, 2022
@tsmethurst tsmethurst deleted the api_v2_media_nullable_fields branch July 22, 2022 10:48
@mirabilos
Copy link
Contributor

Will this fix POST to /api/v2/media timing out in Pinafore?

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.

None yet

2 participants