fix: Seaca push uses same lifecycle text as Telegram (0.9.11)
Reuse telegram templates for FCM title/body so agent start/restart reasons reach mobile without Seaca app changes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,7 @@ from app.models import Event, Problem
|
||||
from app.models.mobile_device import MobileDevice
|
||||
from app.services.notification_severity import severity_meets_minimum
|
||||
from app.services.notification_policy import get_effective_notification_policy
|
||||
from app.services.telegram_templates import format_event_mobile_push
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -170,8 +171,7 @@ def _send_fcm_data(
|
||||
|
||||
|
||||
def _event_payload(event: Event) -> tuple[str, str, dict[str, str]]:
|
||||
title = f"[{event.severity}] {event.title}"
|
||||
body = (event.summary or "")[:200]
|
||||
title, body = format_event_mobile_push(event)
|
||||
data = {
|
||||
"kind": "event",
|
||||
"id": str(event.id),
|
||||
|
||||
Reference in New Issue
Block a user