From 23266bd456337fb97434c25f53ef02a404c23585 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 13 Jan 2023 14:54:26 +0000 Subject: [PATCH] Send old user on delete --- packages/worker/src/sdk/users/users.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/worker/src/sdk/users/users.ts b/packages/worker/src/sdk/users/users.ts index 7132c886e6..5124a5c5b1 100644 --- a/packages/worker/src/sdk/users/users.ts +++ b/packages/worker/src/sdk/users/users.ts @@ -574,7 +574,7 @@ export const destroy = async (id: string, currentUser: any) => { await cache.user.invalidateUser(userId) await sessions.invalidateSessions(userId, { reason: "deletion" }) // let server know to sync user - await apps.syncUserInApps(userId) + await apps.syncUserInApps(userId, dbUser) } const bulkDeleteProcessing = async (dbUser: User) => { @@ -584,7 +584,7 @@ const bulkDeleteProcessing = async (dbUser: User) => { await cache.user.invalidateUser(userId) await sessions.invalidateSessions(userId, { reason: "bulk-deletion" }) // let server know to sync user - await apps.syncUserInApps(userId) + await apps.syncUserInApps(userId, dbUser) } export const invite = async (