mirror of
https://github.com/BEDOLAGA-DEV/remnawave-bedolaga-telegram-bot.git
synced 2026-02-22 12:21:26 +00:00
- Add html.escape() to all untrusted webhook data in admin and device notifications (prevents HTML/Telegram injection) - Add public send_webhook_notification() and is_enabled property to AdminNotificationService (eliminates private method access) - Add dedicated NotificationType enum values for device and not_connected events (fixes incorrect semantic mapping) - Extend user resolution to handle nested user objects and userUuid for device-scope events - Replace manual __anext__() DB session with AsyncSessionLocal context manager; skip DB session for admin-only events - Replace deprecated datetime.utcnow() with datetime.now(UTC) - Use db.flush() instead of db.commit() in handlers (router commits) - Wrap _notify_user in try/except to prevent notification failures from rolling back successful DB mutations