From fb33eefe8e2da22b6f023c6929ad9a7c0fe41750 Mon Sep 17 00:00:00 2001 From: Benjamin Goering Date: Thu, 18 May 2017 08:19:52 -0700 Subject: [PATCH] trivial changes requested by review --- .../coral-admin/src/containers/Configure/ModerationSettings.js | 2 +- client/coral-embed-stream/src/graphql/index.js | 2 ++ services/comments.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/coral-admin/src/containers/Configure/ModerationSettings.js b/client/coral-admin/src/containers/Configure/ModerationSettings.js index 56be58c02..c7df573e8 100644 --- a/client/coral-admin/src/containers/Configure/ModerationSettings.js +++ b/client/coral-admin/src/containers/Configure/ModerationSettings.js @@ -80,7 +80,7 @@ const ModerationSettings = ({settings, updateSettings, onChangeWordlist}) => { onChangeWordlist={onChangeWordlist} /> {/* Edit Comment Timeframe */} - +
{lang.t('configure.edit-comment-timeframe-heading')}

{lang.t('configure.edit-comment-timeframe-text-pre')} diff --git a/client/coral-embed-stream/src/graphql/index.js b/client/coral-embed-stream/src/graphql/index.js index deb604b5c..145098672 100644 --- a/client/coral-embed-stream/src/graphql/index.js +++ b/client/coral-embed-stream/src/graphql/index.js @@ -201,6 +201,8 @@ const extension = { }) => ({ updateQueries: { EmbedQuery: (previousData, {mutationResult: {data: {editComment: {comment, errors}}}}) => { + + // @TODO (kiwi) revisit after streamlining error handling if (errors && errors.length) { return previousData; } diff --git a/services/comments.js b/services/comments.js index f5defb935..def557c96 100644 --- a/services/comments.js +++ b/services/comments.js @@ -55,7 +55,7 @@ module.exports = class CommentsService { // original query. let lastEditableCommentCreatedAt; if (!ignoreEditWindow) { - const editWindowMs = (await SettingsService.retrieve()).editCommentWindowLength; + const {editCommentWindowLength: editWindowMs} = await SettingsService.retrieve(); lastEditableCommentCreatedAt = new Date((new Date()).getTime() - editWindowMs); query.created_at = { $gt: lastEditableCommentCreatedAt,