diff --git a/telethon/types/_custom/chat.py b/telethon/types/_custom/chat.py index a0031bc1..f5056eff 100644 --- a/telethon/types/_custom/chat.py +++ b/telethon/types/_custom/chat.py @@ -20,10 +20,10 @@ if TYPE_CHECKING: def _fwd(field, doc): def fget(self): - return getattr(self._message, field, None) + return getattr(self._chat, field, None) def fset(self, value): - object.__setattr__(self._message, field, value) + object.__setattr__(self._chat, field, value) return property(fget, fset, None, doc) diff --git a/telethon/types/_custom/user.py b/telethon/types/_custom/user.py index 12f2e765..7a636dfd 100644 --- a/telethon/types/_custom/user.py +++ b/telethon/types/_custom/user.py @@ -20,10 +20,10 @@ if TYPE_CHECKING: def _fwd(field, doc): def fget(self): - return getattr(self._message, field, None) + return getattr(self._user, field, None) def fset(self, value): - object.__setattr__(self._message, field, value) + object.__setattr__(self._user, field, value) return property(fget, fset, None, doc)