diff --git a/pyrogram/api/core/object.py b/pyrogram/api/core/object.py index 7f0c7d2f..571ae583 100644 --- a/pyrogram/api/core/object.py +++ b/pyrogram/api/core/object.py @@ -76,7 +76,7 @@ class Encoder(JSONEncoder): if o is not None: if o.startswith("pyrogram.client"): - r = remove_none(OrderedDict([("_", o)] + [i for i in content.items()])) + r = remove_none(OrderedDict([("_", o.split(".")[-1])] + [i for i in content.items()])) r.pop("client", None) return r