fix: Rich-Markup-Fehler bei leeren Styles + Telefonnummer-Normalisierung
- _render_message: leeren style-Tag vermieden (MarkupError bei inbound-Msgs) - Nachrichtentext: eckige Klammern werden escaped (kein Markup-Injection) - get_by_phone: sucht +49xxx und 49xxx gleichzeitig (Green API liefert ohne +)
This commit is contained in:
@@ -143,11 +143,11 @@ class MainScreen(Screen):
|
||||
direction = msg.get("direction", "outbound")
|
||||
direction_prefix = "▶ " if direction == "outbound" else "◀ "
|
||||
status_suffix = " ✗" if msg.get("status") == "failed" else ""
|
||||
style = "dim" if direction == "outbound" else ""
|
||||
text = msg.get("text", "")
|
||||
log.write(
|
||||
f"[dim]{ts}[/dim] [{style}]{direction_prefix}{text}{status_suffix}[/{style}]"
|
||||
)
|
||||
text = msg.get("text", "").replace("[", "\\[")
|
||||
if direction == "outbound":
|
||||
log.write(f"[dim]{ts}[/dim] [dim]{direction_prefix}{text}{status_suffix}[/dim]")
|
||||
else:
|
||||
log.write(f"[dim]{ts}[/dim] {direction_prefix}{text}{status_suffix}")
|
||||
|
||||
# ── Background-Polling ─────────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user