diff --git a/server-plugins/activity-resources/src/index.ts b/server-plugins/activity-resources/src/index.ts index 3113a7ffaf..1521ea4207 100644 --- a/server-plugins/activity-resources/src/index.ts +++ b/server-plugins/activity-resources/src/index.ts @@ -60,13 +60,13 @@ export async function OnReactionChanged (originTx: Tx, control: TriggerControl): if (innerTx._class === core.class.TxCreateDoc) { const txes = await createReactionNotifications(tx, control) - await control.apply(control.ctx, txes, true) + await control.apply(control.ctx, txes) return [] } if (innerTx._class === core.class.TxRemoveDoc) { const txes = await removeReactionNotifications(tx, control) - await control.apply(control.ctx, txes, true) + await control.apply(control.ctx, txes) return [] } diff --git a/server/core/src/triggers.ts b/server/core/src/triggers.ts index 49a9b90c2c..4caeafeb2a 100644 --- a/server/core/src/triggers.ts +++ b/server/core/src/triggers.ts @@ -99,7 +99,9 @@ export class Triggers { ctx, txFactory: null as any, // Will be set later apply: async (ctx, tx, needResult) => { - apply.push(...tx) + if (needResult !== true) { + apply.push(...tx) + } ctrl.txes.push(...tx) // We need to put them so other triggers could check if similar operation is already performed. return await ctrl.apply(ctx, tx, needResult) }