Coverage for fastid / integrations / telegram / notifications.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-10-18 16:37 +0000

1from aiogram import Bot 

2 

3from fastid.auth.schemas import Contact 

4 

5 

6class TelegramNotificationClient: 

7 def __init__(self, bot: Bot) -> None: 

8 self._bot = bot 

9 

10 async def send(self, contact: Contact, content: str) -> None: 

11 async with self._bot: 

12 await self._bot.send_message(contact.recipient["telegram_id"], content)