Description
Telegram is widely used by DeFi communities. A Telegram notification channel lets users receive invoice lifecycle alerts directly in their Telegram channels or DMs without setting up a webhook.
Requirements and context
POST /subscriptions/telegram — register a Telegram bot token and chat ID
- Use the Telegram Bot API to send messages
- Message format: Markdown with key invoice details and a deep link to the dApp
- Support events:
invoice.submitted, invoice.funded, invoice.paid, invoice.expiring_soon, invoice.disputed
- Write tests with mocked Telegram Bot API
Suggested execution
git checkout -b feat/notifications-telegram
- Implement in
notifications/src/delivery/telegram.ts
- Create message templates
- Write tests
Example commit message
feat(notifications): add Telegram notification channel
Description
Telegram is widely used by DeFi communities. A Telegram notification channel lets users receive invoice lifecycle alerts directly in their Telegram channels or DMs without setting up a webhook.
Requirements and context
POST /subscriptions/telegram— register a Telegram bot token and chat IDinvoice.submitted,invoice.funded,invoice.paid,invoice.expiring_soon,invoice.disputedSuggested execution
notifications/src/delivery/telegram.tsExample commit message
feat(notifications): add Telegram notification channel