Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Filter bad/Offensive words from a list

Open x5engine opened this issue 11 years ago • 14 comments

Hi

I think it's important to have since users can use bad/offensive words it's easy we can have a very good words list from either www.noswearing.com or www.bannedwordlist.com and replace(badword,'****') with stars :)

I can do this ASAP I just need to know where to start thanks :)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

x5engine avatar Oct 28 '15 23:10 x5engine

censoring should probably be an option selectable by the users, with an admin setting for auto-enabling, perhaps. Letting people add custom words would be too something to do - and, in parallel, allow to set words that "ping" users

MyPod-zz avatar Nov 02 '15 12:11 MyPod-zz

adding it as an option is easy :)

I have found a good nodejs package

we use right now and have a some code for it:

RocketChat.callbacks.add(beforeSaveMessage, function,(message){
return filter(message.msg);// filter is a function from that package!
},1);

but where can add this ? and how do I deploy it?

Thanks @MyPod

x5engine avatar Nov 02 '15 19:11 x5engine

I have got everything here code and the way to add it but it needs just to be added as an option in the admin panel so user can enable/disable it and/or set a banned list of words in textarea...

It's pretty easy to do but I don't know where should I add it??

x5engine avatar Nov 17 '15 21:11 x5engine

any update on this one !!

mrj0b avatar Jan 01 '16 11:01 mrj0b

Yes, I think this is a viable feature also that needs to be included in any chat.

mchilson avatar Jan 01 '16 17:01 mchilson

I am just wondering if capensisma have figured out where to actually do the filtering?

xj721386 avatar Jan 06 '16 20:01 xj721386

@capensisma have you figured out yet how to do this?

matthijs2704 avatar Apr 14 '16 18:04 matthijs2704

@matthijs2704 @xj721386 sorry I was sleeping :D do you want me to do a PR right now for this? I have many contribution on hold lol just lazy :'(

x5engine avatar Apr 14 '16 18:04 x5engine

@capensisma whoops did I wake you? But if you can do a PR, yes please! :smile:

matthijs2704 avatar Apr 14 '16 18:04 matthijs2704

@matthijs2704 ok I am Officially awake now :D Thanks

Let's do this! :+1:

x5engine avatar Apr 14 '16 18:04 x5engine

It's working :D OMG lemme send a PR after I clean up the code a little lol :D

x5engine avatar Apr 19 '16 01:04 x5engine

@matthijs2704 @xj721386 @mchilson @djeber @MyPod It's DONE https://github.com/RocketChat/Rocket.Chat/pull/2940

x5engine avatar Apr 19 '16 04:04 x5engine

Great job on adding this in, but one problem - I notice it adds a default list of words. Is there any way to flush this ? I've attempted to edit the lang.js file and restarting the server, but entries in that file I've removed still get filtered out.

psybernoid avatar Jul 18 '16 01:07 psybernoid

Closing this due #2940

MartinSchoeler avatar Mar 13 '18 14:03 MartinSchoeler