feat: replace Web Push with ntfy for medication reminders

Single notification path via ntfy HTTP publish for reliable Android delivery;
remove VAPID, push subscriptions, and SW push handlers. PWA settings show
topic subscribe link; humor texts and deep-link actions unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Frank Schwenk
2026-07-06 10:42:58 +02:00
parent 24ac7f2f48
commit 1cada42370
17 changed files with 251 additions and 323 deletions
+3 -3
View File
@@ -13,7 +13,7 @@ from server.ai import generate_daily_motivation, generate_roast_of_the_day
from server.config_loader import load_meds_config, slot_to_dict, today_str
from server.db import get_db, utc_now_iso
from server.messages import pick
from server.push import send_slot_reminder
from server.notify import send_slot_reminder
from server.slots import build_today, get_log_for_day, mark_missed_for_overdue
logger = logging.getLogger(__name__)
@@ -37,7 +37,7 @@ async def _remind_slot(slot_id: str) -> None:
return
title = f"{slot.label} — Med-Time!"
body = pick("reminder", label=slot.label, med=slot.meds[0].name if slot.meds else "Medis")
sent = await send_slot_reminder(db, slot_id, title, body)
sent = await send_slot_reminder(slot_id, title, body)
logger.info("Reminder finished slot=%s day=%s sent=%d", slot_id, day, sent)
finally:
await db.close()
@@ -76,7 +76,7 @@ async def _evening_check() -> None:
logger.info("Evening check marked missed slots=%s", ",".join(marked))
for slot_id in marked:
body = pick("missed")
sent = await send_slot_reminder(db, slot_id, "Verpasst?", body)
sent = await send_slot_reminder(slot_id, "Verpasst?", body)
logger.info("Evening reminder slot=%s sent=%d", slot_id, sent)
finally:
await db.close()