Hi @tutti! I'm new here so I have a couple of questions.
Are you referring to Pleroma.Config.get([:instance, :public])?
What's the expected behavior if public is set to false? Should GET /api/v1/timelines/public return a 404? Or should it return an error message that says the public option of this instance is set to false?
I've had some code for this sitting in a branch for several weeks now, but it's not ready to merge because of the many places where changes need to be made, and because I'm terrible at naming. Please see this branch, starting with commit #e1c9f20c17931f5bd3dd7dfead37e17b75beadc1. The code needs a rewrite and is incomplete.
Essentially, it's trivial to bypass :public false if you hit the Mastodon API instead of the Pleroma FE endpoints. Probably with the OStatus endpoints as well.