Merge branch 'main' into test

This commit is contained in:
PEDZEO
2026-01-19 00:33:21 +03:00
committed by GitHub
3 changed files with 10 additions and 7 deletions

View File

@@ -76,6 +76,11 @@ router.include_router(admin_users_router)
router.include_router(admin_payments_router)
router.include_router(admin_promo_offers_router)
router.include_router(admin_remnawave_router)
router.include_router(ticket_notifications_router)
router.include_router(admin_ticket_notifications_router)
# WebSocket route
router.include_router(websocket_router)
# WebSocket route
router.include_router(websocket_router)

View File

@@ -44,13 +44,10 @@ class AuthMiddleware(BaseMiddleware):
data: Dict[str, Any]
) -> Any:
# Глобальная проверка: если callback с недоступным сообщением — игнорируем
if isinstance(event, CallbackQuery) and isinstance(event.message, InaccessibleMessage):
try:
await event.answer()
except Exception:
pass
return None
# Callback с недоступным сообщением (>48ч) — пропускаем к хендлерам,
# они сами отправят новое сообщение через edit_or_answer_photo
# if isinstance(event, CallbackQuery) and isinstance(event.message, InaccessibleMessage):
# pass # Раньше здесь был return None, теперь пропускаем дальше
user: TgUser = None
if isinstance(event, (Message, CallbackQuery)):

View File

@@ -14,6 +14,7 @@ redis==5.0.1
PyYAML==6.0.2
fastapi==0.115.6
uvicorn==0.32.1
websockets>=12.0
python-multipart==0.0.9
# YooKassa SDK