Open joker314 opened 6 years ago
Hmm I'm not sure how decisions are made here, but let's have a poll!
If you want a Filters server page then react with 👍 If you want a Filters CLI command then react with 👎
Okay, for those wanting to implement the actual filtering bit, I guess this is relevant bit which decides what to do with incoming messages. I suppose the filtering should happen before it even enters the database?
This is separate to how we receive the filter rules though.
This issue is a feature request.
Every server would be able to define a list of find-and-replace regular expressions. These would be applied to incoming messages before sending them out to all other clients.
For example, let's say "apple" is a very very naughty word. Then, into the decent command line, you could type
The first argument is a regular expression, and the second argument is what the replacement should be. Referencing matched groups can be done through
$number
. For example, if a server for developing Decent wanted to replace numeric issue numbers with links to their GitHub issue and PRs, they could do(Note:
/issues/
will redirect to/pulls/
automatically if needed).This is useful because it edits messages in a different way to how a bot would. Main advantages are
For more complicated actions, you can of course use a bot.
How should we deal with removing these filters? I propose
(aah took me way too long to construct that table in a proportional font)
Or, this could be done on the actual (web)client because it's not too hard to do that and it's not that advanced of a feature.