mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 03:14:40 +03:00
Fix wrong spaces (#6296)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
parent
5975a4a135
commit
6dfa55964f
@ -30,6 +30,7 @@ import notification, {
|
||||
} from '@hcengineering/notification'
|
||||
import { DOMAIN_PREFERENCE } from '@hcengineering/preference'
|
||||
import contact, { type PersonSpace } from '@hcengineering/contact'
|
||||
import chunter from '@hcengineering/chunter'
|
||||
|
||||
import { DOMAIN_DOC_NOTIFY, DOMAIN_NOTIFICATION, DOMAIN_USER_NOTIFY } from './index'
|
||||
import { DOMAIN_SPACE } from '@hcengineering/model-core'
|
||||
@ -322,6 +323,26 @@ export const notificationOperation: MigrateOperation = {
|
||||
{ objectSpace: contact.space.Contacts }
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
state: 'migrate-wrong-spaces-v1',
|
||||
func: async () => {
|
||||
await client.update<DocNotifyContext>(
|
||||
DOMAIN_DOC_NOTIFY,
|
||||
{ _class: notification.class.DocNotifyContext, objectClass: chunter.class.DirectMessage },
|
||||
{ objectSpace: core.space.Space }
|
||||
)
|
||||
await client.update<DocNotifyContext>(
|
||||
DOMAIN_DOC_NOTIFY,
|
||||
{ _class: notification.class.DocNotifyContext, objectClass: chunter.class.Channel },
|
||||
{ objectSpace: core.space.Space }
|
||||
)
|
||||
await client.update<DocNotifyContext>(
|
||||
DOMAIN_DOC_NOTIFY,
|
||||
{ _class: notification.class.DocNotifyContext, objectClass: 'recruit:class:Vacancy' as any },
|
||||
{ objectSpace: core.space.Space }
|
||||
)
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user