From d5cabe4f22dfd4fb9a61e8b9766f4092697dd7f6 Mon Sep 17 00:00:00 2001 From: buenosairesam Date: Wed, 15 Apr 2026 23:09:03 -0300 Subject: [PATCH] fix notification template: crew notes as cause, weather as live conditions --- mcp_servers/passenger/server.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mcp_servers/passenger/server.py b/mcp_servers/passenger/server.py index 908d44b..57ea9a2 100644 --- a/mcp_servers/passenger/server.py +++ b/mcp_servers/passenger/server.py @@ -67,9 +67,9 @@ def _template_notification(context: dict) -> str: "", ] - if weather_summary: - lines.append(f"Your flight is delayed due to {weather_summary}.") - elif delay_cause: + if crew_notes_summary: + lines.append(crew_notes_summary) + if delay_cause: cause_text = { "WEATHER": "weather conditions along your route", "MAINTENANCE": "a routine maintenance check on your aircraft", @@ -77,10 +77,10 @@ def _template_notification(context: dict) -> str: "ATC": "air traffic control restrictions", "LATE_AIRCRAFT": "the late arrival of your inbound aircraft", }.get(delay_cause, f"{delay_cause.lower()}") - lines.append(f"Your flight is delayed due to {cause_text}.") - - if crew_notes_summary: - lines.append(crew_notes_summary) + if not crew_notes_summary: + lines.append(f"Your flight is delayed due to {cause_text}.") + if weather_summary: + lines.append(f"Current conditions: {weather_summary}.") if gate: lines.append(f"\nGate {gate} — no gate change expected.")