-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Fix ID type of report methods #193
Conversation
Signed-off-by: Sam Whited <sam@samwhited.com>
If possible, could you please add the link to those changes of mastodon? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #193 +/- ##
==========================================
- Coverage 87.51% 87.14% -0.38%
==========================================
Files 15 16 +1
Lines 1354 1408 +54
==========================================
+ Hits 1185 1227 +42
- Misses 125 133 +8
- Partials 44 48 +4 ☔ View full report in Codecov by Sentry. |
I'm not sure what you mean by this, sorry? If you mean that the mastodon Mastodon API has changed, as far as I can tell it has always been a string that contains a number, not an actual JSON int. For example, see the response here: https://docs.joinmastodon.org/methods/reports/ Unfortunately they don't provide a schema or make any guarantees about the type as far as I can see, but it's currently impossible to use this method because it expects an int and Mastodon returns a string, so it panics. |
If I remember correctly, mastodon also used type int for ID. Where/When was that change included? |
The changelog on that API method doesn't mention that this has ever been changed, and all the other IDs are strings, so it would surprise me if this one was once different for some reason. I don't recall it ever changing, but I haven't been using the mastodon API the entire time it's been around, so I could be wrong. |
make sense. okay will include. |
Thanks |
Creating a report currently results in a panic saying that the ID type (int64) does not match the expected type (string). This patch fixes this.
It is an API breaking change.