Merge branch 'master' into feature/talk-plugin-toxic-comments

This commit is contained in:
Kim Gardner
2017-08-18 09:35:33 +01:00
committed by GitHub
4 changed files with 13 additions and 14 deletions
@@ -8,14 +8,11 @@ export default ({suspectWords, bannedWords, body, ...rest}) => {
const links = linkify.getMatches(body);
const linkText = links ? links.map((link) => link.raw) : [];
// since words are checked against word boundaries on the backend,
// should be the behavior on the front end as well.
// currently the highlighter plugin does not support out of the box.
const searchWords = [...suspectWords, ...bannedWords]
.filter((w) => {
return new RegExp(`(^|\\s)${w}(\\s|$)`, 'i').test(body);
})
.concat(linkText);
const searchWords = [
...suspectWords,
...bannedWords,
...linkText
];
return (
<Highlighter
+4 -2
View File
@@ -74,8 +74,10 @@ export default function settings (state = initialState, action) {
};
case actions.WORDLIST_UPDATED:
return update(state, {
wordList: {
[action.listName]: {$set: action.list},
wordlist: {
[action.listName]: {
$set: action.list
}
}
});
case actions.DOMAINLIST_UPDATED:
+3 -3
View File
@@ -43,7 +43,7 @@ An example docker-compose.yml:
version: '2'
services:
talk:
image: coralproject/talk:1.5
image: coralproject/talk:latest
restart: always
ports:
- "5000:5000"
@@ -86,7 +86,7 @@ on different machines. You can achieve this easily with docker compose:
version: '2'
services:
talk-api:
image: coralproject/talk:1.5
image: coralproject/talk:latest
command: cli serve
restart: always
ports:
@@ -98,7 +98,7 @@ services:
- TALK_MONGO_URL=mongodb://mongo/talk
- TALK_REDIS_URL=redis://redis
talk-jobs:
image: coralproject/talk:1.5
image: coralproject/talk:latest
command: cli jobs process
restart: always
ports:
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "talk",
"version": "3.1.0",
"version": "3.2.0",
"description": "A better commenting experience from Mozilla, The New York Times, and the Washington Post. https://coralproject.net",
"main": "app.js",
"scripts": {