Ignore everything after ; in Matrix location events

This commit is contained in:
Tulir Asokan
2021-08-02 12:52:21 +03:00
parent 742a925040
commit 4edd8eaa7b
+1 -1
View File
@@ -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")