Memmy-App / memmy

An Apollo inspired open-source iOS and Android client for Lemmy built with React-Native. Find us on the App Store and Google Play!
GNU Affero General Public License v3.0
547 stars 58 forks source link

[Feature]: Block bot accounts option #974

Open stiffx opened 1 year ago

stiffx commented 1 year ago

Check for open issues

What is the feature that you would like to have added?

Can we have a block bots option. The repost from reddit are always empty and just take up space in the feed

Solution

Block all accounts marked as bots

Alternatives

N/a

travis-racisz commented 1 year ago

This is something that I would like to contribute for the project. For implementation I was checking out how the app currently handles filtering out NSFW content, and implementing something that is almost identical for Bot Content should be pretty straight forward

in the file setFeedPosts.ts on line 8-10 there is a filter for nsfw posts.

  if (hideNsfw) {
    posts = posts.filter((p) => !p.post.nsfw && !p.community.nsfw);
  }

I think something similar could be done for filtering posts that are made by bot accounts

  if(hideBotAccounts){ 
   posts = posts.filter((p) => !p.post.creator.bot_account); 
}

I would also need to add a switch or button into the settings screen to allow the user to toggle the value as well as adding the value into the store.