fix: migrate collaborative markup in activity (#6400)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2024-08-27 15:33:24 +07:00 committed by GitHub
parent c8357246b1
commit 7dd63873e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -175,6 +175,17 @@ export async function migrateMessagesSpace (
}
}
async function migrateActivityMarkup (client: MigrationClient): Promise<void> {
await client.update(
DOMAIN_ACTIVITY,
{
_class: activity.class.DocUpdateMessage,
'attributeUpdates.attrClass': 'core:class:TypeCollaborativeMarkup'
},
{ 'attributeUpdates.attrClass': core.class.TypeMarkup }
)
}
export const activityOperation: MigrateOperation = {
async migrate (client: MigrationClient): Promise<void> {
await tryMigrate(client, activityId, [
@ -206,6 +217,10 @@ export const activityOperation: MigrateOperation = {
{ space: contact.space.Contacts }
)
}
},
{
state: 'migrate-activity-markup',
func: migrateActivityMarkup
}
])
},