UBER-1179: fix comments saving (#4205)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina 2023-12-15 14:29:43 +04:00 committed by GitHub
parent 818a5c829a
commit fa939dd0de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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<void> {
async function convertCommentsToChatMessages (client: MigrationClient): Promise<void> {
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 = {