Merge branch 'master'

Conflicts:
	client/coral-plugin-commentbox/CommentBox.js
This commit is contained in:
Riley Davis
2017-02-24 13:33:25 -07:00
+4 -3
View File
@@ -30,6 +30,7 @@ class CommentBox extends Component {
postItem,
assetId,
updateCountCache,
isReply,
countCache,
parentId,
addNotification,
@@ -46,17 +47,17 @@ class CommentBox extends Component {
if (this.props.charCount && this.state.body.length > this.props.charCount) {
return;
}
updateCountCache(assetId, countCache + 1);
!isReply && updateCountCache(assetId, countCache + 1);
postItem(comment, 'comments')
.then(({data}) => {
const postedComment = data.createComment.comment;
if (postedComment.status === 'REJECTED') {
addNotification('error', lang.t('comment-post-banned-word'));
updateCountCache(assetId, countCache);
!isReply && updateCountCache(assetId, countCache);
} else if (postedComment.status === 'PREMOD') {
addNotification('success', lang.t('comment-post-notif-premod'));
updateCountCache(assetId, countCache);
!isReply && updateCountCache(assetId, countCache);
}
if (commentPostedHandler) {