-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Support exclusive lists with GotoSocial 0.17 #808
Comments
Looking into this. Have a question: how can I tell the server is a GoToSocial server? According to GoToSocial's API docs,
If this is still the case for newer versions, it's not clear to me how a client can tell that it's dealing with version 0.17 of GTS as opposed to version 0.17 of Mastodon or something else. There's no other field that says the type of server software. By contrast, my account on pixelfed.social returns a version string of:
...which allows Phanpy to determine that it's Pixelfed and, in principle (although Phanpy doesn't currently do this), to know that a feature is available in version 0.12 of Pixelfed but not version 0.11 of Pixelfed, etc. |
@graue The Mastodon API isn't the correct way to determine a server's actual version. It doesn't even usually give you the correct Mastodon API version the server's trying to fake; iirc Pixelfed has some APIs that weren't in Mastodon 3.5 and is missing a bunch that were, and I'm not counting Pixelfed-specific extensions. (Pleroma/Akkoma have similar issues.) While there is a GtS option that will return a similar fake Mastodon version string, it's not on by default, because it's intended only for use with really broken clients. I think the correct answer is to use NodeInfo. Every Fedi server and many non-Fedi servers support it, and it'll have name and version fields that give you the server's actual software, not the Mastodon version it might be pretending to be. Once you've got that info, you can then attempt an This is the approach Feditext uses: real version from NodeInfo, further details from instance API. (And it has an internal list of which API methods and parameters are available on which versions of which backends, so that both user-visible UI and invisible API calls can be disabled if they're not supported. For example, it won't show the exclusive list toggle on GtS 0.16.) Side note: Pleroma/Akkoma have additional details in |
That makes sense. Too bad the NodeInfo protocol and schema don't seem to be supported by Masto.js and look rather complicated. It makes this a bigger task than it appeared to be. Edit: Aha, I see why Masto.js doesn't support this: no stable release of Mastodon has the proper CORS headers to allow a client-side JS app to fetch the NodeInfo. The fix for the issue will be in Mastodon 4.3. Akkoma, Pixelfed, and GoToSocial don't have this problem. |
For Mastodon <=4.3 (all current stable releases of Mastodon), the NodeInfo request will always fail due to mastodon/mastodon#23135 and fall back to the existing behavior. For other server software, this will allow for more accurate checking of feature availability. Fixes cheeaun#808: adds support for exclusive lists with GoToSocial 0.17+.
Ooof, never ran into this with a native client. At least it only affects Mastodon out of the ones you listed, and only temporarily, so you know that if you can't get a NodeInfo doc but can get an instance API, it's probably Mastodon. Sorry it's a bigger issue than it looked initially! |
Is your feature request related to a problem? Please describe.
GotoSocial's upcoming 0.17 release will include Mastodon-API-compatible exclusive lists. Phanpy already supports them on Mastodon instances through the "Hide posts on this list from Home/Following" list edit checkbox, and they work great.
Describe the solution you'd like
I'd love to see Phanpy add support for them with GtS 0.17 as well. API should be the same:
Feditext and Fedicat didn't hit any issues adding it, afaik.
The text was updated successfully, but these errors were encountered: