trivial changes requested by review

This commit is contained in:
Benjamin Goering
2017-05-18 08:19:52 -07:00
parent cb45f0a8b3
commit fb33eefe8e
3 changed files with 4 additions and 2 deletions
@@ -80,7 +80,7 @@ const ModerationSettings = ({settings, updateSettings, onChangeWordlist}) => {
onChangeWordlist={onChangeWordlist} />
{/* Edit Comment Timeframe */}
<Card className={`${styles.configSetting}`}>
<Card className={styles.configSetting}>
<div className={styles.settingsHeader}>{lang.t('configure.edit-comment-timeframe-heading')}</div>
<p>
{lang.t('configure.edit-comment-timeframe-text-pre')}
@@ -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;
}
+1 -1
View File
@@ -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,