mirror of
https://github.com/wassname/talk.git
synced 2026-07-24 13:20:47 +08:00
[CORL-416] Disable Live Updates (#2391)
* feat: initial implementation * fix: docs
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
GQLAuth,
|
||||
GQLFacebookAuthIntegration,
|
||||
GQLGoogleAuthIntegration,
|
||||
GQLLiveConfiguration,
|
||||
GQLLocalAuthIntegration,
|
||||
GQLMODERATION_MODE,
|
||||
GQLOIDCAuthIntegration,
|
||||
@@ -10,7 +11,10 @@ import {
|
||||
GQLSSOAuthIntegration,
|
||||
} from "coral-server/graph/tenant/schema/__generated__/types";
|
||||
|
||||
export type LiveConfiguration = Omit<GQLLiveConfiguration, "configurable">;
|
||||
|
||||
export interface GlobalModerationSettings {
|
||||
live: LiveConfiguration;
|
||||
moderation: GQLMODERATION_MODE;
|
||||
premodLinksEnable: boolean;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
createIndexFactory,
|
||||
} from "coral-server/models/helpers/indexing";
|
||||
import Query from "coral-server/models/helpers/query";
|
||||
import { GlobalModerationSettings } from "coral-server/models/settings";
|
||||
import { TenantResource } from "coral-server/models/tenant";
|
||||
|
||||
import {
|
||||
@@ -33,7 +34,9 @@ function collection<T = Story>(mongo: Db) {
|
||||
return mongo.collection<Readonly<T>>("stories");
|
||||
}
|
||||
|
||||
export type StorySettings = DeepPartial<GQLStorySettings>;
|
||||
export type StorySettings = DeepPartial<
|
||||
Pick<GQLStorySettings, "messageBox"> & GlobalModerationSettings
|
||||
>;
|
||||
|
||||
export type StoryMetadata = GQLStoryMetadata;
|
||||
|
||||
|
||||
@@ -81,6 +81,11 @@ export async function createTenant(
|
||||
// Default to post moderation.
|
||||
moderation: GQLMODERATION_MODE.POST,
|
||||
|
||||
// Default to enabled.
|
||||
live: {
|
||||
enabled: true,
|
||||
},
|
||||
|
||||
communityGuidelines: {
|
||||
enabled: false,
|
||||
content: "",
|
||||
|
||||
Reference in New Issue
Block a user