feat(notifications): emit at maintenance/turn/sync/reauth events

This commit is contained in:
Gabriel Brown
2026-07-11 16:08:22 -04:00
parent 4eb0c963ff
commit 3766a29871
7 changed files with 270 additions and 2 deletions
+10
View File
@@ -378,6 +378,16 @@ const refreshOwnedSpoon = async (
error: message,
}),
]);
if (!rateLimited) {
await ctx.runMutation(internal.notifications.emit, {
userId: ownerId,
kind: 'sync_failed',
title: `Sync failed for ${spoon.name}`,
body: message,
link: `/spoons/${spoonId}`,
spoonId,
});
}
throw new ConvexError(message);
}
};