diff --git a/tg/msg.py b/tg/msg.py index 35af44a..5c35ef4 100644 --- a/tg/msg.py +++ b/tg/msg.py @@ -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