diff --git a/server-plugins/notification-resources/src/index.ts b/server-plugins/notification-resources/src/index.ts index 04f5dc10d5..bf5bb2ac36 100644 --- a/server-plugins/notification-resources/src/index.ts +++ b/server-plugins/notification-resources/src/index.ts @@ -755,7 +755,7 @@ async function removeContexts ( export async function createCollabDocInfo ( ctx: MeasureContext, - res: Tx[], + currentRes: Tx[], collaborators: Ref[], control: TriggerControl, tx: TxCUD, @@ -765,6 +765,8 @@ export async function createCollabDocInfo ( unsubscribe: Ref[] = [], cache = new Map, Doc>() ): Promise { + let res: Tx[] = [] + if (tx.space === core.space.DerivedTx) { return res } @@ -812,7 +814,7 @@ export async function createCollabDocInfo ( : collaborators.filter( (it) => space.members.includes(it) || - res.some((tx) => { + currentRes.some((tx) => { if (tx._class === core.class.TxUpdateDoc) { const updateTx = tx as TxUpdateDoc if (updateTx.objectId === space._id) {