superseriousbusiness / gotosocial

Fast, fun, small ActivityPub server.
https://docs.gotosocial.org
GNU Affero General Public License v3.0
3.56k stars 300 forks source link

[feature] Filter out non-image-described posts on Home and Public timelines #249

Open tsmethurst opened 2 years ago

tsmethurst commented 2 years ago

From a post by Robert Kingett:

I would love a way to filter out images without alt text. My hope is that #GoToSocial will consider adding this option.

Source: https://writing.exchange/@blindscribe/107008433624020438

I think this is something we can easily add on an API level, since we already allow passing filters like local=true to API calls to /api/v1/timelines/home and /api/v1/timelines/public.

Unfortunately even if we implement this in GtS, we'll have to persuade client applications like Tusky and Pinafore to implement it as well, but we can cross that bridge when we come to it.

f0x52 commented 2 years ago

How about setting it as a user profile setting, so the clients need 0 support? With that set, your API calls will always filter it for you

tsmethurst commented 2 years ago

How about setting it as a user profile setting, so the clients need 0 support? With that set, your API calls will always filter it for you

That could work, then we can just add the filtering logic to the visibility package for the various timelines: https://github.com/superseriousbusiness/gotosocial/tree/main/internal/visibility