diff --git a/web/notifications.py b/web/notifications.py index 2ead525..484e037 100644 --- a/web/notifications.py +++ b/web/notifications.py @@ -118,7 +118,8 @@ def on_match(user_id: int, flat: dict) -> None: rent_str = _fmt_num(rent) if sqm_price: - rent_str += f" ({sqm_price:.0f} €/m²)" + # German-style decimal separator, rounded to the cent. + rent_str += f" ({sqm_price:.2f} €/m²)".replace(".", ",") body = ( f"{line1}\n{line2}\n" @@ -129,8 +130,14 @@ def on_match(user_id: int, flat: dict) -> None: f"Original: {link}\n" f"lazyflat: {deep_link}" ) + # Telegram Markdown can't span link text across newlines, so emit two + # separate links that share the same Google Maps URL — both lines render + # blue + clickable, layout stays two-line. + addr_md = f"[{line1}]({gmaps})" + if line2: + addr_md += f"\n[{line2}]({gmaps})" md = ( - f"[{line1}]({gmaps})\n{line2}\n" + f"{addr_md}\n" f"Miete: {rent_str}\n" f"Fläche: {_fmt_num(size)}\n" f"Zimmer: {_fmt_num(rooms)}\n"