Coder Social home page Coder Social logo

mattermost-plugin-profanity-filter's Introduction

Disclaimer

This repository is community supported and not maintained by Mattermost. Mattermost disclaims liability for integrations, including Third Party Integrations and Mattermost Integrations. Integrations may be modified or discontinued at any time.

Mattermost Profanity Filter Plugin (Beta)

Build Status Code Coverage Release HW

This plugin allows you to censor profanity on your Mattermost server. The plugin checks all messages for matches against the configured "Bad words list" before they are posted to any channel. The characters in any word matches are replaced with a series of "*"s.

Supported Mattermost Server Versions: 5.2+

Installation

  1. Go to the releases page of this Github repository and download the latest release for your Mattermost server.
  2. Upload this file in the Mattermost System Console under System Console > Plugins > Management to install the plugin. To learn more about how to upload a plugin, see the documentation.
  3. Activate the plugin at System Console > Plugins > Management.

Usage

You can edit the bad words list in System Console > Plugins > Profanity Filter > Bad words list. In this list, you can use Regular Expressions to match bad words. For example, bad[[:space:]]?word will match both badword and bad word.

Choose to either censor the bad words with a character or reject the post with a custom warning message:

Post rejected by the plugin

Post censored by the plugin

mattermost-plugin-profanity-filter's People

Contributors

aaronrothschild avatar bbuehrle avatar cpanato avatar crspeller avatar cwarnermm avatar hanzei avatar jasonblais avatar justinegeffen avatar jwilander avatar mickmister avatar n-thumann avatar nathanaelhoun avatar spirosoik avatar toninis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mattermost-plugin-profanity-filter's Issues

Change word list to be coma delimited instead of space delimited

The word list is currently space delimited. This is not ideal because in some cases "bad word" should be filtered but "bad" and "word" are not offensive at all in a different context when not next to each other.

This should be coma delimited so users can specify to filter on "bad word" but users can post "bad" or "word".

Note that the current list already includes terms that have spaces in them which would cause unexpected words to be blocked.

Idea: Add Flag a Message for rules violations --> send to admin

Sometimes there are messages that are offensive but do not use profanity. In those cases, ideally a person in a channel could flag a message for review by a moderator/admin.

In Plugin Console setting page:

  • TRUE/FALSE setting for "Allow users to flag messages for review by a moderator"
  • Add box for "Moderators to be notified" as a text box with comma separated usernames who will be notified when a message is flagged for a violation by someone.

In Message Dropdown Menu:

  • Add a message action: "Report Violation" for posts
  • When user clicks it, a modal is presented saying "Would you like to report this message to a moderator for review?" buttons to "Proceed" or "Cancel"
  • If clicks on Proceed - A message is sent to the Moderators along the lines of "User X has reported that a message should be reviewed by a moderator - Click Here for parent conversation(LINK)"
  • Future: Perhaps add an interactive button to the message sent to moderators to include a button to "Delete Message" immediately

Unable to download according to README.MD

There aren’t any releases here
Releases are powered by tagging specific points of history in a repository. They’re great for marking release points like v1.0.

Profanity filter should ignore punctuation when looking for profanity

Currently the profanity filter only looks for words that are an exact match on the "Bad words list" and nothing with punctuation is filtered out. So if I type "expletive" it will get filtered by the pluign but, "expletive!" or "expletive." with the punctuation, the filter has no affect.

Because it very common, we need to be able to filter words that are followed by punctuation. Maybe we could use some type of regex match instead?

Case sensitivity

Is there a flag to set that would ignore case-sensitivity? The filter censors f*** but leaves F*** alone.

Edit badwords list from settings

Is it possible to make the bad words list editable from the plugin settings in the admin console ?

It would be easier to quickly add a word to the list

Web links getting destroyed.

The plugin is working great for intended profanity, however, often long links with random letters in them match a profanity, which then breaks the link and the link becomes unusable.

Could you include an option to ignore HTML links?

Appreciate your work on this.

golangci-lint error on master branch

I'm seeing a lint error on master when running the full make. Not sure if this started recently or has been there for a while but I can repro on commit 3aeb251

Running golangci-lint
golangci-lint run ./...
build/manifest/main.go:106:13: G306: Expect WriteFile permissions to be 0600 or less (gosec)
		if err := ioutil.WriteFile(
			"server/manifest.go",
			[]byte(fmt.Sprintf(pluginIDGoFileTemplate, manifest.Id, manifest.Version)),
			0644,
		); err != nil {
build/manifest/main.go:116:13: G306: Expect WriteFile permissions to be 0600 or less (gosec)
		if err := ioutil.WriteFile(
			"webapp/src/manifest.js",
			[]byte(fmt.Sprintf(pluginIDJSFileTemplate, manifest.Id, manifest.Version)),
			0644,
		); err != nil {
make: *** [golangci-lint] Error 1

Disable for plugins posts

Sometimes posts created by plugins/integrations are rejected by the plugin.
It's hard to understand for the user because he doesn't see any track for this (we can just see this in the server logs).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.