Initial work for locking flag type and providing translations

This commit is contained in:
Wyatt Johnson
2017-10-03 17:20:40 -06:00
parent 8a02618d8a
commit 00de72a6eb
13 changed files with 80 additions and 53 deletions
+1 -13
View File
@@ -17,22 +17,12 @@ const {
ADD_COMMENT_TAG,
EDIT_COMMENT
} = require('../../perms/constants');
const debug = require('debug')('talk:graph:mutators:comment');
const {
DISABLE_AUTOFLAG_SUSPECT_WORDS
} = require('../../config');
const debug = require('debug')('talk:graph:mutators:tags');
const plugins = require('../../services/plugins');
const pluginTags = plugins.get('server', 'tags').reduce((acc, {plugin, tags}) => {
debug(`added plugin '${plugin.name}'`);
acc = acc.concat(tags);
return acc;
}, []);
const resolveTagsForComment = async ({user, loaders: {Tags}}, {asset_id, tags = []}) => {
const item_type = 'COMMENTS';
@@ -48,8 +38,6 @@ const resolveTagsForComment = async ({user, loaders: {Tags}}, {asset_id, tags =
globalTags = [];
}
globalTags = globalTags.concat(pluginTags);
// Merge in the tags for the given comment.
tags = tags.map((name) => {