feat: geo location as Google Maps link in Telegram notifications
When signal has geo, show clickable Google Maps link instead of raw coordinates. Without geo, show "Гео нету". Added parse_mode=HTML to send_message for link rendering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
04f7bd79e2
commit
47b89ded8d
4 changed files with 8 additions and 8 deletions
|
|
@ -223,9 +223,9 @@ async def signal(
|
|||
|
||||
ts = datetime.fromtimestamp(body.timestamp / 1000, tz=timezone.utc)
|
||||
geo_info = (
|
||||
f"📍 {lat}, {lon} (±{accuracy}м)"
|
||||
f"📍 <a href=\"https://maps.google.com/maps?q={lat},{lon}\">{lat}, {lon}</a> (±{accuracy:.0f}м)"
|
||||
if geo
|
||||
else "Без геолокации"
|
||||
else "Гео нету"
|
||||
)
|
||||
text = (
|
||||
f"🚨 Сигнал от {user_name}\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue