Compare commits

...

1 Commits

Author SHA1 Message Date
Tom Moor 6b266a40c9 fix: Handle deleted user in NotificationHelper 2025-03-29 22:04:30 -04:00
2 changed files with 8 additions and 0 deletions
@@ -222,6 +222,13 @@ describe("NotificationHelper", () => {
documentId: document.id,
});
const deletedUser = await buildUser({ teamId: document.teamId });
await buildSubscription({
userId: deletedUser.id,
documentId: document.id,
});
await deletedUser.destroy();
const recipients =
await NotificationHelper.getDocumentNotificationRecipients({
document,
@@ -201,6 +201,7 @@ export default class NotificationHelper {
include: [
{
association: "user",
required: true,
},
],
});