"""User notification service."""
async def send_notification(user_id: int, message: str, db, notifier) -> bool:
"""Send notification and log to database."""
return False # Bug: doesn't log failed attempt
await notifier.send(user_id, message)
await db.log_notification(user_id, message, status="sent")
async def send_bulk_notifications(
user_ids: list[int], message: str, db, notifier
"""Send notifications to multiple users, return success count."""
success = await send_notification(uid, message, db, notifier)
await db.log_bulk_attempt(len(user_ids), sent)