mirror of
https://github.com/wassname/talk.git
synced 2026-07-11 01:57:14 +08:00
trivial changes requested by review
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user