Add match notification digests

This commit is contained in:
jjbrunton committed 2026-01-17 20:16:05 +00:00
1 parent b070a6f6a2
commit 3e70669a27
5 files changed
+324 -33

No files matched your search

@@ -218,14 +218,9 @@ Deno.serve(async (req) => {
if (!matchError && newMatch) {
result.new_match = newMatch;
// Trigger push notification for new match
try {
await supabase.functions.invoke("send-notification", {
body: { couple_id: profile.couple_id, match_id: newMatch.id },
});
} catch (notifyError) {
console.error("Failed to send notification:", notifyError);
}
// Match push notifications are queued via a Postgres trigger
// (pending_match_notifications) to allow short digesting.
}
}
}