Skip to content

Commit

Permalink
Fix notifications (#7775)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristina-fefelova authored Jan 23, 2025
1 parent 927ccec commit 5696ba2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server-plugins/notification-resources/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ async function removeContexts (

export async function createCollabDocInfo (
ctx: MeasureContext,
res: Tx[],
currentRes: Tx[],
collaborators: Ref<PersonAccount>[],
control: TriggerControl,
tx: TxCUD<Doc>,
Expand All @@ -765,6 +765,8 @@ export async function createCollabDocInfo (
unsubscribe: Ref<PersonAccount>[] = [],
cache = new Map<Ref<Doc>, Doc>()
): Promise<Tx[]> {
let res: Tx[] = []

if (tx.space === core.space.DerivedTx) {
return res
}
Expand Down Expand Up @@ -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<Space>
if (updateTx.objectId === space._id) {
Expand Down

0 comments on commit 5696ba2

Please sign in to comment.