5.4.0 Release Bug Fixes (#2789)

* fix: addresses CORL-848

Fixed copy for new commenters feature.

* fix: address CORL-847

Revert the line hight changes on select fields for now.

* fix: addressed CORL-851

Changed copy on CSS field.

* fix: addressed CORL-840

Changed deletion window to 24 hours.
Refactored durations to use TIME enum.
This commit is contained in:
Wyatt Johnson
2020-01-14 16:39:21 +00:00
committed by GitHub
parent a88644d98e
commit 9b8ab6de5f
36 changed files with 1061 additions and 1063 deletions
+3 -7
View File
@@ -45,13 +45,9 @@ export function getStoryClosedAt(
if (tenant.closeCommenting.auto) {
// Auto-close stream has been enabled, convert the createdAt time into the
// closedAt time by adding the closedTimeout.
return (
DateTime.fromJSDate(story.createdAt)
// closedTimeout is in seconds, so multiply by 1000 to get
// milliseconds.
.plus(tenant.closeCommenting.timeout * 1000)
.toJSDate()
);
return DateTime.fromJSDate(story.createdAt)
.plus({ seconds: tenant.closeCommenting.timeout })
.toJSDate();
}
return;
+6 -10
View File
@@ -2,8 +2,9 @@ import { isEmpty } from "lodash";
import { Db } from "mongodb";
import uuid from "uuid";
import { DEFAULT_SESSION_LENGTH } from "coral-common/constants";
import { DEFAULT_SESSION_DURATION } from "coral-common/constants";
import { LanguageCode } from "coral-common/helpers/i18n/locales";
import TIME from "coral-common/time";
import { DeepPartial, Omit, Sub } from "coral-common/types";
import { dotize } from "coral-common/utils/dotize";
import { Settings } from "coral-server/models/settings";
@@ -99,16 +100,12 @@ export async function createTenant(
premodLinksEnable: false,
closeCommenting: {
auto: false,
// 2 weeks timeout.
timeout: 60 * 60 * 24 * 7 * 2,
timeout: 2 * TIME.WEEK,
},
disableCommenting: {
enabled: false,
},
// 30 seconds edit window length.
editCommentWindowLength: 30,
editCommentWindowLength: 30 * TIME.SECOND,
charCount: {
enabled: false,
},
@@ -117,7 +114,7 @@ export async function createTenant(
banned: [],
},
auth: {
sessionDuration: DEFAULT_SESSION_LENGTH,
sessionDuration: DEFAULT_SESSION_DURATION,
integrations: {
local: {
enabled: true,
@@ -169,8 +166,7 @@ export async function createTenant(
},
recentCommentHistory: {
enabled: false,
// 7 days in seconds.
timeFrame: 604800,
timeFrame: 7 * TIME.DAY,
// Rejection rate defaulting to 30%, once exceeded, comments will be
// pre-moderated.
triggerRejectionRate: 0.3,