hometown-fork / hometown

A supported fork of Mastodon that provides local posting and a wider range of content types.
GNU Affero General Public License v3.0
743 stars 55 forks source link

Add serverside setting for local posting defaults to API #1219

Closed dariusk closed 1 year ago

dariusk commented 1 year ago

The serverside setting for "Allow my posts to reach other instances by default" should be exposed on an API endpoint so that third party clients that support local-only posts can respect it.

It should be on this endpoint:

GET https://mastodon.example/api/v1/preferences HTTP/1.1

And the response should look something like:

{
  "posting:default:visibility": "public",
  "posting:default:sensitive": false,
  "posting:default:language": null,
  "posting:default:federation": true,
  "reading:expand:media": "default",
  "reading:expand:spoilers": false
}

where posting:default:federation is a new field and corresponds to the setting in the user's preferences of "Allow my posts to reach other instances by default".

Also note: should update "instances" to "servers" there.

dariusk commented 1 year ago

This is fixed in the upcoming v1.0.8 release.