diff --git a/INSTALL.md b/INSTALL.md
index 49033acc8..aed9cbad8 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -243,7 +243,7 @@ file under the `scripts` key including:
# Setup
Once you've installed Talk (either via Docker or source), you still need to
-setup the application. If you are unfamiliar with any terminoligy used in the
+setup the application. If you are unfamiliar with any terminology used in the
setup process, refer to the `TERMINOLOGY.md` document.
## Via Web
diff --git a/client/coral-admin/src/graphql/mutations/index.js b/client/coral-admin/src/graphql/mutations/index.js
index 364243cb1..4d62201d1 100644
--- a/client/coral-admin/src/graphql/mutations/index.js
+++ b/client/coral-admin/src/graphql/mutations/index.js
@@ -55,15 +55,24 @@ export const setCommentStatus = graphql(SET_COMMENT_STATUS, {
updateQueries: {
ModQueue: (oldData) => {
const comment = oldData.all.find(c => c.id === commentId);
- comment.status = 'ACCEPTED';
+ let accepted;
+ let acceptedCount = oldData.acceptedCount;
+
+ // if the comment was already in the Approved queue, don't re-add it
+ if (comment.status === 'ACCEPTED') {
+ accepted = [...oldData.accepted];
+ } else {
+ comment.status = 'ACCEPTED';
+ acceptedCount++;
+ accepted = [comment, ...oldData.accepted];
+ }
+
const premod = oldData.premod.filter(c => c.id !== commentId);
const flagged = oldData.flagged.filter(c => c.id !== commentId);
- const accepted = [comment].concat(oldData.accepted);
const rejected = oldData.rejected.filter(c => c.id !== commentId);
const premodCount = premod.length < oldData.premod.length ? oldData.premodCount - 1 : oldData.premodCount;
const flaggedCount = flagged.length < oldData.flagged.length ? oldData.flaggedCount - 1 : oldData.flaggedCount;
const rejectedCount = rejected.length < oldData.rejected.length ? oldData.rejectedCount - 1 : oldData.rejectedCount;
- const acceptedCount = oldData.acceptedCount + 1;
return {
...oldData,
@@ -89,14 +98,23 @@ export const setCommentStatus = graphql(SET_COMMENT_STATUS, {
updateQueries: {
ModQueue: (oldData) => {
const comment = oldData.all.find(c => c.id === commentId);
- comment.status = 'REJECTED';
- const rejected = [comment].concat(oldData.rejected);
+ let rejected;
+ let rejectedCount = oldData.rejectedCount;
+
+ // if the item was already in the Rejected queue, don't put it in again
+ if (comment.status === 'REJECTED') {
+ rejected = oldData.rejected;
+ } else {
+ comment.status = 'REJECTED';
+ rejectedCount++;
+ rejected = [comment, ...oldData.rejected];
+ }
+
const premod = oldData.premod.filter(c => c.id !== commentId);
const flagged = oldData.flagged.filter(c => c.id !== commentId);
const accepted = oldData.accepted.filter(c => c.id !== commentId);
const premodCount = premod.length < oldData.premod.length ? oldData.premodCount - 1 : oldData.premodCount;
const flaggedCount = flagged.length < oldData.flagged.length ? oldData.flaggedCount - 1 : oldData.flaggedCount;
- const rejectedCount = oldData.rejectedCount + 1;
const acceptedCount = accepted.length < oldData.accepted.length ? oldData.acceptedCount - 1 : oldData.acceptedCount;
return {
diff --git a/client/coral-admin/src/graphql/queries/index.js b/client/coral-admin/src/graphql/queries/index.js
index 53113558b..9d2357ce7 100644
--- a/client/coral-admin/src/graphql/queries/index.js
+++ b/client/coral-admin/src/graphql/queries/index.js
@@ -39,6 +39,9 @@ export const loadMore = (fetchMore) => ({limit, cursor, sort, tab, asset_id}) =>
case 'all':
statuses = null;
break;
+ case 'accepted':
+ statuses = ['ACCEPTED'];
+ break;
case 'premod':
statuses = ['PREMOD'];
break;
diff --git a/client/coral-embed-stream/src/components/Comment.js b/client/coral-embed-stream/src/components/Comment.js
index 4f8426159..7ce143c55 100644
--- a/client/coral-embed-stream/src/components/Comment.js
+++ b/client/coral-embed-stream/src/components/Comment.js
@@ -197,7 +197,9 @@ class Comment extends React.Component {
}
{asset.settings.closedMessage}
- } - {!loggedIn && } - {loggedIn && user &&{asset.settings.closedMessage}
} + {!loggedIn && + } + {loggedIn && + user && +