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

Adding a `norss` user preference #1233

Closed dariusk closed 1 year ago

dariusk commented 1 year ago

There is now a norss user preference for a user to opt out of having an RSS feed of their public posts. This operates on the exact same logic as the existing noindex for the search engine opt-out: the admin can check a box in Site Settings for a default setting for users. If a user has never touched their RSS opt-out setting then it is equal to whatever the default is. But individual users can override the default in their Preferences -> Other menu.

So a privacy-minded server admin could opt everyone out by default, but the overall default behavior is to have RSS feeds of public posts for everyone, which is the default Mastodon behavior anyway.

The norss, like noindex, is just a key on a pre-existing settings object that is a key-value store, so there doesn't even need to be a database migration for this!

If you are opted out of RSS, there will be no feed discovery link in your profile's HTML, and if you go to the RSS url where you would expect to find the RSS file, you will get an empty but valid RSS feed. It will have the account name but no content (I did this so that existing RSS readers won't complain if they are subscribing to a feed and then that person shuts theirs off -- it will just look like there is no content in the feed rather than throwing a 404).

Appearance in Administration --> Site Settings:

image

Appearance for individual users in Preferences --> Other:

image

Fixes #1232

ironiridis commented 1 year ago

Awesome, thank you! 🥳