Skip to content

Commit c88ca2e

Browse files
committed
Add namespaces when printing Object types
1 parent c22cf3d commit c88ca2e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pyrogram/api/core/object.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,14 @@ def default(self, o: Object):
7777

7878
if o is not None:
7979
if o.startswith("pyrogram.client"):
80-
r = remove_none(OrderedDict([("_", name)] + [i for i in content.items()]))
80+
r = remove_none(OrderedDict([("_", "pyrogram:" + name)] + [i for i in content.items()]))
8181
r.pop("_client", None)
8282

8383
return r
8484
else:
85-
return OrderedDict([("_", o)] + [i for i in content.items()])
85+
return OrderedDict(
86+
[("_", o.replace("pyrogram.api.types.", "telegram:"))]
87+
+ [i for i in content.items()]
88+
)
8689
else:
8790
return None

0 commit comments

Comments
 (0)