Merge branch 'missing-comments' into new-flags

This commit is contained in:
Chi Vinh Le
2017-09-19 23:53:46 +07:00
3 changed files with 10 additions and 8 deletions
@@ -28,7 +28,6 @@ export default {
name: t('modqueue.rejected'),
},
all: {
statuses: ['NONE', 'PREMOD', 'ACCEPTED', 'REJECTED'],
icon: 'question_answer',
name: t('modqueue.all'),
},
+8 -6
View File
@@ -281,12 +281,14 @@ const getCommentsByQuery = async (ctx, {ids, statuses, asset_id, parent_id, auth
// Only administrators can search for comments with statuses that are not
// `null`, or `'ACCEPTED'`.
if (ctx.user != null && ctx.user.can(SEARCH_NON_NULL_OR_ACCEPTED_COMMENTS) && statuses && statuses.length > 0) {
comments = comments.where({
status: {
$in: statuses
}
});
if (ctx.user != null && ctx.user.can(SEARCH_NON_NULL_OR_ACCEPTED_COMMENTS)) {
if (statuses && statuses.length > 0) {
comments = comments.where({
status: {
$in: statuses
}
});
}
} else {
comments = comments.where({
status: {
+2 -1
View File
@@ -20,6 +20,7 @@
"talk-plugin-sort-most-replied",
"talk-plugin-author-menu",
"talk-plugin-member-since",
"talk-plugin-ignore-user"
"talk-plugin-ignore-user",
"talk-plugin-moderation-actions"
]
}