From fa939dd0de6a107e0e70b98d89db46e40b9a31d8 Mon Sep 17 00:00:00 2001 From: Kristina Date: Fri, 15 Dec 2023 14:29:43 +0400 Subject: [PATCH] UBER-1179: fix comments saving (#4205) Signed-off-by: Kristina Fefelova --- models/chunter/src/index.ts | 2 +- models/chunter/src/migration.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index 5a2591ae45..14043816ba 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -178,7 +178,7 @@ export class TDirectMessageInput extends TClass implements DirectMessageInput { component!: AnyComponent } -@Model(chunter.class.ChatMessage, activity.class.ActivityMessage, DOMAIN_CHUNTER) +@Model(chunter.class.ChatMessage, activity.class.ActivityMessage) export class TChatMessage extends TActivityMessage implements ChatMessage { @Prop(TypeMarkup(), chunter.string.Message) @Index(IndexKind.FullText) diff --git a/models/chunter/src/migration.ts b/models/chunter/src/migration.ts index 75db42c70a..d91e8faccd 100644 --- a/models/chunter/src/migration.ts +++ b/models/chunter/src/migration.ts @@ -21,7 +21,7 @@ import { tryMigrate } from '@hcengineering/model' import { chunterId } from '@hcengineering/chunter' -import { DOMAIN_NOTIFICATION } from '@hcengineering/model-notification' +import { DOMAIN_ACTIVITY } from '@hcengineering/model-activity' import { DOMAIN_COMMENT } from './index' import chunter from './plugin' @@ -90,7 +90,7 @@ async function createBacklink (tx: TxOperations): Promise { async function convertCommentsToChatMessages (client: MigrationClient): Promise { await client.update(DOMAIN_COMMENT, { _class: chunter.class.Comment }, { _class: chunter.class.ChatMessage }) - await client.move(DOMAIN_COMMENT, { _class: chunter.class.ChatMessage }, DOMAIN_NOTIFICATION) + await client.move(DOMAIN_COMMENT, { _class: chunter.class.ChatMessage }, DOMAIN_ACTIVITY) } export const chunterOperation: MigrateOperation = {