Add location tests, and fix live location expires_at parsing

This commit is contained in:
Mads Marquart
2019-10-23 11:08:52 +02:00
parent ef5c86c427
commit 648cbb4999
2 changed files with 92 additions and 1 deletions

View File

@@ -91,7 +91,7 @@ class LiveLocationAttachment(LocationAttachment):
if target.get("coordinate")
else None,
name=data["title_with_entities"]["text"],
expires_at=_util.millis_to_datetime(target.get("expiration_time")),
expires_at=_util.seconds_to_datetime(target.get("expiration_time")),
is_expired=target.get("is_expired"),
)
media = data.get("media")