Ignore everything after ; in Matrix location events
This commit is contained in:
@@ -332,7 +332,7 @@ class PortalMatrix(BasePortal, ABC):
|
|||||||
content: LocationMessageEventContent, reply_to: TelegramID
|
content: LocationMessageEventContent, reply_to: TelegramID
|
||||||
) -> None:
|
) -> None:
|
||||||
try:
|
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)
|
lat, long = float(lat), float(long)
|
||||||
except (KeyError, ValueError):
|
except (KeyError, ValueError):
|
||||||
self.log.exception("Failed to parse location")
|
self.log.exception("Failed to parse location")
|
||||||
|
|||||||
Reference in New Issue
Block a user