mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
Extend the self-cleaning Telegram bot beyond medication. A mood reminder now carries a 1-5 inline keyboard plus a "Note..." force-reply and a "Later" action; a tap logs a MoodEntry (source TELEGRAM, server-side, user resolved from the linked chat, idempotent on a per-tap externalId) and confirms with a calm callback toast, no chat echo. An optional free-text note attaches to that entry via the prompt-context correlation. A measurement reminder carries "Done" (satisfies the cadence) and "Later" (pushes nextDueAt forward) — completion and snooze only, no value capture. Prompts and replies self-clean in ~30 minutes: the window drops from 1h and moves to a shared helper, the sender schedules an unanswered prompt's deletion at send time, and the existing 15-min sweep also prunes expired prompt-context rows. The webhook keeps the shared-secret + timingSafeEqual + rate-limit-before-secret posture; every write callback authenticates via the stored chat binding. The Telegram chat id is added to the egress redaction denylist.