fix(telegram): sync rejected polling callbacks
All checks were successful
Code Review / ai-code-review (push) Successful in 11s
CD Pipeline / tests (push) Successful in 1m40s
CD Pipeline / build-and-deploy (push) Successful in 3m31s
CD Pipeline / post-deploy-checks (push) Successful in 1m36s

This commit is contained in:
Your Name
2026-05-18 00:03:52 +08:00
parent 06f64c6ddd
commit 9e1b15dabf
2 changed files with 75 additions and 0 deletions

View File

@@ -7171,6 +7171,27 @@ class TelegramGateway:
username=username,
execution_triggered=False,
)
try:
from src.services.incident_approval_service import (
get_incident_approval_service,
)
await get_incident_approval_service().on_approval_status_change(
approval_id=str(approval_uuid),
new_status="rejected",
)
logger.info(
"telegram_rejection_incident_synced_via_polling",
approval_id=str(approval_uuid),
incident_id=getattr(approval, "incident_id", None),
)
except Exception as _sync_e:
logger.warning(
"telegram_rejection_incident_sync_failed_via_polling",
approval_id=str(approval_uuid),
incident_id=getattr(approval, "incident_id", None),
error=str(_sync_e),
)
elif action == "tune":
logger.info(