lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Configuration options for nodeinfo

Open lullis opened this issue 1 year ago • 2 comments

Requirements

  • [X] Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • [X] Did you check to see if this issue already exists?
  • [X] Is this only a feature request? Do not put multiple feature requests in one issue.
  • [X] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • [X] Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

When building the database for https://fediverser.network, I'd like to be able to use the nodeinfo endpoint to query an instance about extra capabilities:

  • alternative frontends and its locations.
  • Links to Privacy Policy, Terms of Service, etc.
  • Extra categorization (e.g, "preferred languages", "local groups from country/region X", etc)
  • extra fediverser capabilities (e.g, "signup via Reddit OAuth", "bridging with Reddit", "allows community requests", etc)

Describe the solution you'd like.

I believe that the "metadata" field in the nodeinfo schema should be fine for that. it is a simple freeform key-value property map and it doesn't need to be more complicated than that.

Describe alternatives you've considered.

Using a proxy server to rewrite the response from lemmy. In the case of fediverser specifically, it could work because I already can reroute some of the requests away from Lemmy.

Additional context

What would be the best place to have this? Ideally it would be part of the settings for the instance, but it would okay if it was defined at deploy time on config.hjson.

lullis avatar Jul 16 '24 22:07 lullis

I can definitely see how this would be useful, though Im unsure whats the best way to do it. Having admins manually enter freeform data sounds like a hassle, and easy to mess things up.

We could configure this through the ui, but that requires changes to the database, api and frontend to add various separate form fields. Overall a lot of effort. Doing it through the config would be trivial to implement in comparison so I would use that approach.

Nutomic avatar Jul 17 '24 21:07 Nutomic

If you know its a lemmy instance from the nodeinfo, you can then call https://voyager.lemmy.ml/api/v3/site to get things like the privacy policy (located at site_view.local_site.legal), and various other site-specific settings.

https://join-lemmy.org/api/interfaces/GetSiteResponse.html

I'm not sure how useful it'd be to try to duplicate all that in the nodeinfo, and especially if its dynamic data, hard-coding that wouldn't work anyway.

dessalines avatar Jul 21 '24 17:07 dessalines

Right its better to use /api/v3/site and other endpoints, rather than duplicating the same info.

Nutomic avatar Jan 24 '25 15:01 Nutomic