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

Filter#keywords can be null in API response #27977

Closed
saket opened this issue Nov 19, 2023 · 4 comments
Closed

Filter#keywords can be null in API response #27977

saket opened this issue Nov 19, 2023 · 4 comments
Labels
bug Something isn't working status/to triage This issue needs to be triaged

Comments

@saket
Copy link

saket commented Nov 19, 2023

Steps to reproduce the problem

I'm not sure what the correct steps to reproduce this are, but I just ran into a status that was filtered server-side by mastodon, but does not contain any Filter#keywords value.

Expected behaviour

Filter#keywords should be non-empty as per the API documentation: https://docs.joinmastodon.org/entities/Filter/#keywords

Actual behaviour

Filter#keywords was null

Detailed description

FWIW I noticed that mastodon-android does not mark Filter#keywords as a required field. It was explicitly removed here:

mastodon/mastodon-android@17957b6#diff-fb05f829ceea869fb58eafc6203750f0c7d1a9d3a84b32a4e7903541ef065aa0

Mastodon instance

androiddev.social

Mastodon version

v4.2.1

Technical details

No response

@saket saket added bug Something isn't working status/to triage This issue needs to be triaged labels Nov 19, 2023
@ClearlyClaire
Copy link
Contributor

The keywords and statuses are only returned when you query the filter. They are left out of the filtered attribute because that information is generally not useful in that context and would cause an unwarranted increase in payload size.

@saket
Copy link
Author

saket commented Nov 21, 2023

Gotcha. Can the documentation be updated to mark them as nullable in that case?

@trwnh
Copy link
Member

trwnh commented Nov 22, 2023

Please file this against https://github.com/mastodon/documentation

@saket
Copy link
Author

saket commented Nov 22, 2023

Done. Thanks!

mastodon/documentation#1343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status/to triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

3 participants