-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
API response changes on #5762 broke many apps #5856
Comments
@Gargron @aschmitz interested to hear your thoughts, but I'm guessing the cleanest way to fix this is to just make it a new property instead: "muting_reblogs" or "following_reblogs" adding an entire new endpoint version number for something that's really such a simple change and can be done in a backwards compatible way seems excessive. |
I don't have a strong preference. I think the new API is the cleaner way of
returning the data, given that it's a property of the following or muting
setting, but I do see the semver issue (and obviously crashing clients and
other unwanted behavior is bad).
Threading new properties through the interface may be a bit of a pain if I
recall, though.
Out of curiosity, has the notification muting change (which uses the same
API response style) made it into a numbered release yet?
I'm open to whatever seems most feasible. I suspect we'll have to change
(probably in the way @nightpool suggests), rather than getting all the apps
that might break to update and flaunting the semver rules, but if someone
else has ideas, I'm open to them too.
|
Hm, okay, maybe I made the wrong call... But neither of the API changes is in a release yet, are they? If I remember correctly, the optional notification muting PR did not make it in time for 2.0.0. If everyone agrees, I will restore the old response format on the v1 methods and create equivalent v2 methods.
Well, I thought it'd be backwards-compatible because of "truthiness" in JavaScript and Ruby, but to be fair any typed language like Java will throw its hands up into the air at a slight structure change. I think if we just see the |
Yeah, that's fine, though it doesn't quite feel like it warrants a whole
new version. What would you think about having the serializer just pull
those properties out and make them separate booleans like @nightpool
described?
|
yeah making it a v2 endpoint feels really premature—it's a pretty small compromise for no real reason. (also it'd affect a bunch of endpoints I think?) |
This closes mastodon#5856 by restoring the existing behavior of the `muting` and `following` keys (returning booleans rather than truthy or false). It adds `showing_reblogs` and `muting_notifications` keys: * `showing_reblogs` returns true if: 1. You've requested to follow the user, with reblogs shown, or 2. You are following the user, with reblogs shown. * `muting_notifications` returns true if you have muted the user and their notifications as well.
* Break out nested relationship API keys This closes #5856 by restoring the existing behavior of the `muting` and `following` keys (returning booleans rather than truthy or false). It adds `showing_reblogs` and `muting_notifications` keys: * `showing_reblogs` returns true if: 1. You've requested to follow the user, with reblogs shown, or 2. You are following the user, with reblogs shown. * `muting_notifications` returns true if you have muted the user and their notifications as well. * Rubocop fix * Fix pulling reblog/mute status from relationships I could swear this had passed tests before, but apparently not. Works now. * More test fixes Really, you'd expect this to be more straightforward.
quote from #5762:
Before:
After:
Then, when I open followee's profile on iOS apps...
also my friends says Tusky and SubwayTooter are also broken. I think those breaking change shouldn't be happen on Mastodon 2.1 because it's not a major version up.
master
(If you're a user, don't worry about this).The text was updated successfully, but these errors were encountered: