mastodon / mastodon

Your self-hosted, globally interconnected microblogging community
https://joinmastodon.org
GNU Affero General Public License v3.0
47.16k stars 6.99k forks source link

Add Word filters and website domain block #15523

Open jakesullyneytiri opened 3 years ago

jakesullyneytiri commented 3 years ago

I would like to see feature that lets head admin of the site to block alot of specific words, like sexual words to racsist words and other words that admin does not want to be used on their Mastodon and no i don't mean user filter for each user, i want one that main admin can block so users who tries to write them will be rejected or have words replaced or that when they write word the word would disapear automaticly since it detects word is forbidden.

Other feature would be blocking domains when writing toots public, to followers and PM/DM, so if a user tries to post a link to a site with following domain it will either reject with a error message saying something like "This domain link is not allowed".

So if the admin does not want users to advertise a specific site that may contain illegal stuff or goes to a site that owner of mastodon thinks it isn't suitable to discuss/advertise that site on his mastodon.

BigSkyRider commented 3 years ago

I agree with jakesullyneytiri and would also like to additionally request regex filtering support (user and admin filtering) along with the ability for the 'Drop instead of hide' feature to be applicable to public timelines, maybe as a secondary "Are you sure?" option if there's good reason for it to not be applicable to public timelines. Replacing spam, with repetitive filter notifications is nice, but could be better by being able to get rid of the filtering notifications entirely.

The use-case for regex support would be to be able to build a 'hashtag porn' filter, add the series of hashtags into a single filter, and then be able to drop those messages from the conglomerated filter instead of having to create potentially dozes of filters to accomplish the same thing. If there's a better/more user friendly approach than regex to do so, like a listing of blocked words, that would suffice.

I also think that when multiple filters are in effect, being able to troubleshoot which filter was applied in the filter notifications would be very handy. So that if a filter was created to block 'somewebsite.com', allow the filter creator to give the filter a name, and have that name appear in the filter notification. This way when multiple filters are enabled, and something is identified as erroneously being blocked (specially if regex support is added), this would allow troubleshooting to determine which filter is in error and in need of tuning.

tastytea commented 3 years ago

Pleroma has phrase filters for a long time and they were very useful in blocking spam from attackers who quickly register accounts on changing instances.

f0x52 commented 2 years ago

Getting completely flooded with spam, all the same message, from accounts on any open-registration instance under the sun. A word filter would completely negate this. Can't even do local user filtering for the Federated timeline because you can't drop the messages, so it's just filled with "Filtered" and still unusable. Instance CPU suffers a lot too