worker: Telegram notice about every purchase (notify task)
A separate worker task, apart from invoicing: each paid checkout is
announced once to the operator's Telegram chat ('Páros csomag, 6 000 Ft',
marked when it was a test payment), without the buyer's data. Outages
and rate limits are retried; a wrong token or chat is logged, not
retried. Needs TELEGRAM_BOT_TOKEN (.env.secrets) and TELEGRAM_CHAT_ID.
Also fixes the worker test that still expected the old sign-up e-mail
subject (CI failed on it since 7d6a6c3).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- When the operator's Telegram notice about a paid checkout went out (the
|
||||
-- worker's `notify` task). Earlier purchases count as notified.
|
||||
ALTER TABLE stripe_checkouts ADD COLUMN notified_at timestamptz;
|
||||
UPDATE stripe_checkouts SET notified_at = now() WHERE completed_at IS NOT NULL;
|
||||
Reference in New Issue
Block a user