Merge branch 'master' into talk-product-guide-features

This commit is contained in:
Kim Gardner
2017-10-20 17:53:31 +01:00
committed by GitHub
2 changed files with 2 additions and 6 deletions
@@ -115,17 +115,14 @@ class ModerationContainer extends Component {
document: COMMENT_EDITED_SUBSCRIPTION,
variables,
updateQuery: (prev, {subscriptionData: {data: {commentEdited: comment}}}) => {
const notifyText = t('modqueue.notify_edited', comment.user.username, prepareNotificationText(comment.body));
return this.handleCommentChange(prev, comment, notifyText);
return this.handleCommentChange(prev, comment);
},
},
{
document: COMMENT_FLAGGED_SUBSCRIPTION,
variables,
updateQuery: (prev, {subscriptionData: {data: {commentFlagged: comment}}}) => {
const user = comment.actions[comment.actions.length - 1].user;
const notifyText = t('modqueue.notify_flagged', user.username, prepareNotificationText(comment.body));
return this.handleCommentChange(prev, comment, notifyText);
return this.handleCommentChange(prev, comment);
},
},
];
@@ -32,7 +32,6 @@ export default class ModTag extends React.Component {
postTag = async () => {
try {
await this.props.postTag();
this.props.notify('success', t('talk-plugin-featured-comments.notify_self_featured', this.props.comment.user.username));
}
catch(err) {
this.props.notify('error', getErrorMessages(err));