mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-29 12:53:44 +03:00
Fix access to properties in User and Chat
This commit is contained in:
parent
a76c9e9f4c
commit
4c94407b79
|
@ -20,10 +20,10 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
def _fwd(field, doc):
|
def _fwd(field, doc):
|
||||||
def fget(self):
|
def fget(self):
|
||||||
return getattr(self._message, field, None)
|
return getattr(self._chat, field, None)
|
||||||
|
|
||||||
def fset(self, value):
|
def fset(self, value):
|
||||||
object.__setattr__(self._message, field, value)
|
object.__setattr__(self._chat, field, value)
|
||||||
|
|
||||||
return property(fget, fset, None, doc)
|
return property(fget, fset, None, doc)
|
||||||
|
|
||||||
|
|
|
@ -20,10 +20,10 @@ if TYPE_CHECKING:
|
||||||
|
|
||||||
def _fwd(field, doc):
|
def _fwd(field, doc):
|
||||||
def fget(self):
|
def fget(self):
|
||||||
return getattr(self._message, field, None)
|
return getattr(self._user, field, None)
|
||||||
|
|
||||||
def fset(self, value):
|
def fset(self, value):
|
||||||
object.__setattr__(self._message, field, value)
|
object.__setattr__(self._user, field, value)
|
||||||
|
|
||||||
return property(fget, fset, None, doc)
|
return property(fget, fset, None, doc)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user