Comments (7)
For the "Expose Mastodon API compatible version" part, there's an optional setting called instance-inject-mastodon-version
.
Plus, /api/v2/instance
returns source_url
, which may be considered as another alternative.
from gotosocial.
For the "Expose Mastodon API compatible version" part, there's an optional setting called
instance-inject-mastodon-version
.Plus,
/api/v2/instance
returnssource_url
, which may be considered as another alternative.
Thanks, I'm operating on the client side so can't control the instance configuration, but source_url
is a good option. TootSDK is only using the v1 instance but I can add v2 to my fork and try it out.
edit: I just looked in the gotosocial code and saw instanceMastodonVersion
is harcoded to 3.5.3 so I will do the same!
from gotosocial.
Perhaps another alternative would be to look at the node-info page for the 'software' value?
For example: https://gts.superseriousbusiness.org/nodeinfo/2.0 returns:
{
"version": "2.0",
"software": {
"name": "gotosocial",
"version": "0.15.0+git-15733cd"
},
"protocols": [
"activitypub"
],
"services": {
"inbound": [],
"outbound": []
},
"openRegistrations": true,
"usage": {
"users": {
"total": 5
},
"localPosts": 2769
},
"metadata": {}
}
By comparison, https://mastodon.social/nodeinfo/2.0 returns:
{
"version": "2.0",
"software": {
"name": "mastodon",
"version": "4.3.0-nightly.2024-04-29"
},
"protocols": [
"activitypub"
],
"services": {
"outbound": [],
"inbound": []
},
"usage": {
"users": {
"total": 1927427,
"activeMonth": 239944,
"activeHalfyear": 622063
},
"localPosts": 89637022
},
"openRegistrations": true,
"metadata": {
"nodeName": "Mastodon",
"nodeDescription": "The original server operated by the Mastodon gGmbH non-profit"
}
}
from gotosocial.
Thanks, examining nodeinfo does look like a better approach to figuring out what platform you're dealing with before making any API queries, and the nodeinfo README lists many of the ones I'm dealing with.
https://github.com/jhass/nodeinfo
Edit: and I see this is what feditext is doing.
from gotosocial.
Shall I close this then, since we already have what you need? :)
from gotosocial.
Shall I close this then, since we already have what you need? :)
You can close this as a won't-fix, of course, but I wouldn't say I have what I need, more like I'm looking at workarounds. Currently I'm hardcoding the API version and string matching for "git" which is not so good for both parts.
Most gotosocial instances don't seem to have the mastodon version display flag turned on, and the one I found that does, displays a slightly older version (3.3.0) which also results in it being displayed as the GotoSocial version on its home page and FediDb, and that version string is just the version with no suffix so there's no way to distinguish from that string that it's gotosocial.
I'm working on querying for the v2 instance so I can get the source_url but that will only fix the platform issue and v2 instance was introduced with mastodon 4.0 so I don't know how many platforms have it implemented.
So I still think it would be preferable to have the version string conform to the pseudo-convention for Mastodon API-compatible platforms, and then you wouldn't need the instance-inject-mastodon-version
option.
from gotosocial.
I'll go ahead and close this then. The nodeinfo is ideally what clients should use to figure out the implementation.
The instance-inject-mastodon-version
thing is a crutch but it's been helpful to nudge some fidgetty clients. But most admin's don't enable it since, well, most clients don't need it π.
from gotosocial.
Related Issues (20)
- [help] Split-domain δΈθ½η»ε½ phanpy.social ε neodb.social HOT 13
- [Frontend HTML Markup] Add specific body classes to different frontend pages HOT 1
- Separate storage configuration for media caching HOT 1
- [feature] Domain names as usernames HOT 4
- [performance/chore] Update local + federated (public) timelines to use `internal/timeline`
- [bug] Delivery goroutines experienced a panic with "not yet initialized" while executing CLI commands HOT 1
- [bug] fedilab shows error after boosting post HOT 7
- [bug] twblue and possibly software based around mastodon.pi doesn't work HOT 6
- [bug] Remote edits of media descriptions are not applied HOT 1
- [bug] Unable to interact with ktistec users HOT 2
- [bug] Duplicate boost notifications HOT 6
- [feature] Remove the `quote-inline` class from statuses HOT 5
- [bug/frontend] Custom emoji shortcode is not changed after addition/changed input file HOT 1
- [bug] "sql: no rows in result set" when attempting to accept an incoming follow request HOT 1
- [bug] External Users can still see followings/followers of a follow-hiddened account HOT 4
- [bug] Posting undo of a "like" to the inbox may result in 500 internal server error HOT 1
- [chore/frontend] Refactor layout + styling for consistency
- We're on holiday from May 8th up to and including May 26th
- [bug] filters donβt seem to always work HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gotosocial.