From 4edd8eaa7b405e261158e6dc916cd1d264de02da Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 2 Aug 2021 12:52:21 +0300 Subject: [PATCH] Ignore everything after ; in Matrix location events --- mautrix_telegram/portal/matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mautrix_telegram/portal/matrix.py b/mautrix_telegram/portal/matrix.py index d568196f..9ec59dbc 100644 --- a/mautrix_telegram/portal/matrix.py +++ b/mautrix_telegram/portal/matrix.py @@ -332,7 +332,7 @@ class PortalMatrix(BasePortal, ABC): content: LocationMessageEventContent, reply_to: TelegramID ) -> None: try: - lat, long = content.geo_uri[len("geo:"):].split(",") + lat, long = content.geo_uri[len("geo:"):].split(";")[0].split(",") lat, long = float(lat), float(long) except (KeyError, ValueError): self.log.exception("Failed to parse location")