redz1029 758869920c Fix push notifications never delivered — 3 root causes
1. CRITICAL: Double idempotency check silently discarded every notification.
   process_scheduled_notifications called try_mark_notification_pushed first,
   then send_fcm called it again and saw "already pushed" → skipped FCM send.
   Fix: Remove the check from process_scheduled_notifications; send_fcm's
   own check is sufficient (and needed for direct Flutter client calls).

2. SEND_FCM_URL env var crash: If not configured, edge function crashed on
   module load. Fix: Derive from SUPABASE_URL (always auto-set) as fallback.

3. Timing windows too narrow: ±30s windows with 60s cron intervals could
   miss events between runs. Fix: Widen to ±90s. ON CONFLICT DO NOTHING
   prevents duplicates, making wider windows safe.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 20:50:45 +08:00
2026-03-20 15:14:21 +08:00
2026-02-22 21:04:30 +08:00
2026-03-07 23:47:18 +08:00
2026-03-11 22:28:38 +08:00
2026-02-09 20:10:13 +08:00
2026-02-09 20:10:42 +08:00
2026-02-09 20:10:42 +08:00
2026-03-12 20:38:19 +08:00
2026-03-12 20:38:19 +08:00
2026-02-09 20:10:42 +08:00
S
Description
No description provided
Readme 275 MiB
Languages
Dart 80.1%
JavaScript 5.8%
PLpgSQL 5.5%
Shell 3.4%
HTML 3%
Other 1.9%