Skip to content

Commit

Permalink
Fix sticker view (#244)
Browse files Browse the repository at this point in the history
The filepath of a sticker is stored in the key "file".
  • Loading branch information
JingMatrix authored Oct 31, 2021
1 parent 5d02e0f commit eb15f3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tg/msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def get_doc(cls, msg: Dict[str, Any], deep: int = 10) -> Dict[str, Any]:
doc = doc[field]
else:
doc = doc.get(field)
if "file" in doc:
return doc["file"]
if doc is None:
return {}
return doc
Expand Down

0 comments on commit eb15f3e

Please sign in to comment.