mirror of
https://github.com/wassname/talk.git
synced 2026-08-14 12:50:17 +08:00
[CORL-116] Configure sitewide commenting (#2193)
* feat: configure sitewide commenting * fix: repaired snapshots * fix: updated snapshots * test: update snapshots
This commit is contained in:
@@ -764,6 +764,23 @@ type CharCount {
|
||||
max: Int
|
||||
}
|
||||
|
||||
################################################################################
|
||||
## DisableCommenting
|
||||
################################################################################
|
||||
|
||||
type DisableCommenting {
|
||||
"""
|
||||
enabled when true will disable commenting site-wide.
|
||||
"""
|
||||
enabled: Boolean!
|
||||
|
||||
"""
|
||||
message will be shown above the comment stream while
|
||||
commenting is disabled site-wide.
|
||||
"""
|
||||
message: String
|
||||
}
|
||||
|
||||
################################################################################
|
||||
## Email
|
||||
################################################################################
|
||||
@@ -937,13 +954,7 @@ type Settings {
|
||||
"""
|
||||
disableCommenting will disable commenting site-wide.
|
||||
"""
|
||||
disableCommenting: Boolean!
|
||||
|
||||
"""
|
||||
disableCommentingMessage will be shown above the comment stream while
|
||||
commenting is disabled site-wide.
|
||||
"""
|
||||
disableCommentingMessage: String
|
||||
disableCommenting: DisableCommenting!
|
||||
|
||||
"""
|
||||
editCommentWindowLength is the length of time (in seconds) after a comment is
|
||||
@@ -2125,6 +2136,19 @@ input SettingsCharCountInput {
|
||||
max: Int
|
||||
}
|
||||
|
||||
input SettingsDisableCommentingInput {
|
||||
"""
|
||||
enabled when true will disable commenting site-wide.
|
||||
"""
|
||||
enabled: Boolean
|
||||
|
||||
"""
|
||||
message will be shown above the comment stream while
|
||||
commenting is disabled site-wide.
|
||||
"""
|
||||
message: String
|
||||
}
|
||||
|
||||
"""
|
||||
SettingsInput is the partial type of the Settings type for performing mutations.
|
||||
"""
|
||||
@@ -2196,13 +2220,7 @@ input SettingsInput {
|
||||
"""
|
||||
disableCommenting will disable commenting site-wide.
|
||||
"""
|
||||
disableCommenting: Boolean
|
||||
|
||||
"""
|
||||
disableCommentingMessage will be shown above the comment stream while
|
||||
commenting is disabled site-wide.
|
||||
"""
|
||||
disableCommentingMessage: String
|
||||
disableCommenting: SettingsDisableCommentingInput
|
||||
|
||||
"""
|
||||
editCommentWindowLength is the length of time (in seconds) after a comment is
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Omit } from "talk-common/types";
|
||||
import {
|
||||
GQLAuthDisplayNameConfiguration,
|
||||
GQLCharCount,
|
||||
GQLDisableCommenting,
|
||||
GQLEmail,
|
||||
GQLExternalIntegrations,
|
||||
GQLFacebookAuthIntegration,
|
||||
@@ -34,8 +35,7 @@ export interface ModerationSettings {
|
||||
*/
|
||||
closedTimeout: number;
|
||||
closedMessage?: string;
|
||||
disableCommenting: boolean;
|
||||
disableCommentingMessage?: string;
|
||||
disableCommenting: GQLDisableCommenting;
|
||||
charCount: GQLCharCount;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,9 @@ export async function createTenant(mongo: Db, input: CreateTenantInput) {
|
||||
questionBoxEnable: false,
|
||||
premodLinksEnable: false,
|
||||
autoCloseStream: false,
|
||||
disableCommenting: false,
|
||||
disableCommenting: {
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
// 2 weeks timeout.
|
||||
closedTimeout: 60 * 60 * 24 * 7 * 2,
|
||||
|
||||
Reference in New Issue
Block a user