damus-io / damus

iOS nostr client
GNU General Public License v3.0
1.99k stars 289 forks source link

Option to filter NSFW content including PFPs and links #73

Open bebopkid opened 1 year ago

bebopkid commented 1 year ago

The ability to filter out NSFW posts, comments, and PFPs will help with mass adoption. Most social sites have this on by default like imgur, etc.

alltheseas commented 1 year ago

User Story

As a Damus user, I would like the option to set a NSFW image filter, so that I can customize according to my preferences.

Acceptance Criteria

  1. Damus app sets up a NSFW filter that screens all incoming images from all relays for NSFW content, and
  2. Damus app sets up a NSFW filter that screens all profile pictures for NSFW content, and
  3. Damus user will have option to hide, or display NSFW images, and
  4. Damus will default to hide NSFW images.
alltheseas commented 1 year ago

@realprogrammersusevim

See above user story.

From your comments below, it seems you are adding a couple criteria:

  1. Don’t load profile pics from users who I do not follow
  2. Allow the user to configure the global feed to only show posts from a certain follow distance away

Damus global feed needs to be majorly reworked..

- Definitely don’t load profile pics from people who aren’t friends - Maybe allow the user to configure the global feed to only show posts from a certain follow distance away - Once I can get the NSFW filter to work definitely don’t load any images from people you don’t follow

Not loading profile pics from people who aren’t follow should be easy. Just do exactly what we’ve done with images to the profile pics.

https://damus.io/note18fgg473qhsudlr30kfe3thvccufhct2t2palwluwzl3uvwl3gtsslfeera

image https://damus.io/note1ahk5gr5c908n29mlkq0hxj3wm5333qgdt93ugk0a78pnfz9mhzzsxna5c8

realprogrammersusevim commented 1 year ago

Looks great! For now at least the pfp pull request just treats pfps like images and has a dumb filter based on following. Once I can get the NSFW ML model filter working I can work on adding all the necessary config options. It might be a while since I have absolutely no experience with using CoreML models, I've only used models in Python.

alltheseas commented 1 year ago

Looks great! For now at least the pfp pull request just treats pfps like images and has a dumb filter based on following. Once I can get the NSFW ML model filter working I can work on adding all the necessary config options. It might be a while since I have absolutely no experience with using CoreML models, I've only used models in Python.

Ok! I can mark off the criteria one by one, as you and the other devs knock them out.

PFP PR: Blur profile pics if not following with some exceptions https://github.com/damus-io/damus/pull/492