mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-26 04:23:58 +03:00
Dont notify child update (#2949)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
601300556d
commit
f42d06cfce
@ -603,13 +603,15 @@ export async function collaboratorDocHandler (tx: Tx, control: TriggerControl, t
|
|||||||
async function collectionCollabDoc (tx: TxCollectionCUD<Doc, AttachedDoc>, control: TriggerControl): Promise<Tx[]> {
|
async function collectionCollabDoc (tx: TxCollectionCUD<Doc, AttachedDoc>, control: TriggerControl): Promise<Tx[]> {
|
||||||
const actualTx = TxProcessor.extractTx(tx)
|
const actualTx = TxProcessor.extractTx(tx)
|
||||||
let res = await collaboratorDocHandler(actualTx, control, tx._id)
|
let res = await collaboratorDocHandler(actualTx, control, tx._id)
|
||||||
const doc = (await control.findAll(tx.objectClass, { _id: tx.objectId }, { limit: 1 }))[0]
|
if ([core.class.TxCreateDoc, core.class.TxRemoveDoc].includes(actualTx._class)) {
|
||||||
if (doc !== undefined) {
|
const doc = (await control.findAll(tx.objectClass, { _id: tx.objectId }, { limit: 1 }))[0]
|
||||||
if (control.hierarchy.hasMixin(doc, notification.mixin.Collaborators)) {
|
if (doc !== undefined) {
|
||||||
const collabMixin = control.hierarchy.as(doc, notification.mixin.Collaborators)
|
if (control.hierarchy.hasMixin(doc, notification.mixin.Collaborators)) {
|
||||||
res = res.concat(
|
const collabMixin = control.hierarchy.as(doc, notification.mixin.Collaborators)
|
||||||
await createCollabDocInfo(collabMixin.collaborators, tx, tx.objectId, tx.objectClass, control, tx._id)
|
res = res.concat(
|
||||||
)
|
await createCollabDocInfo(collabMixin.collaborators, tx, tx.objectId, tx.objectClass, control, tx._id)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
Loading…
Reference in New Issue
Block a user