diff --git a/pyrogram/api/core/object.py b/pyrogram/api/core/object.py index c45e40bc..e3092212 100644 --- a/pyrogram/api/core/object.py +++ b/pyrogram/api/core/object.py @@ -72,7 +72,7 @@ class Encoder(JSONEncoder): else: return repr(o) - if "pyrogram" in objects.get(getattr(o, "ID", "")): + if objects.get(getattr(o, "ID", "")).startswith("pyrogram.client"): return remove_none(OrderedDict([i for i in content.items()])) else: return OrderedDict(