mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +03:00
Fix Forward had its client set to None (#1247)
This commit is contained in:
parent
13e9119573
commit
2ace4fde41
|
@ -27,8 +27,7 @@ class Forward(ChatGetter, SenderGetter):
|
||||||
# Copy all the fields, not reference! It would cause memory cycles:
|
# Copy all the fields, not reference! It would cause memory cycles:
|
||||||
# self.original_fwd.original_fwd.original_fwd.original_fwd
|
# self.original_fwd.original_fwd.original_fwd.original_fwd
|
||||||
# ...would be valid if we referenced.
|
# ...would be valid if we referenced.
|
||||||
self.__dict__ = dict(original.__dict__)
|
self.__dict__.update(original.__dict__)
|
||||||
self._client = client
|
|
||||||
self.original_fwd = original
|
self.original_fwd = original
|
||||||
|
|
||||||
sender, input_sender = utils._get_entity_pair(
|
sender, input_sender = utils._get_entity_pair(
|
||||||
|
@ -41,7 +40,9 @@ class Forward(ChatGetter, SenderGetter):
|
||||||
chat, input_chat = utils._get_entity_pair(
|
chat, input_chat = utils._get_entity_pair(
|
||||||
utils.get_peer_id(peer), entities, client._entity_cache)
|
utils.get_peer_id(peer), entities, client._entity_cache)
|
||||||
|
|
||||||
|
# This call resets the client
|
||||||
ChatGetter.__init__(self, peer, chat=chat, input_chat=input_chat)
|
ChatGetter.__init__(self, peer, chat=chat, input_chat=input_chat)
|
||||||
SenderGetter.__init__(self, original.from_id, sender=sender, input_sender=input_sender)
|
SenderGetter.__init__(self, original.from_id, sender=sender, input_sender=input_sender)
|
||||||
|
self._client = client
|
||||||
|
|
||||||
# TODO We could reload the message
|
# TODO We could reload the message
|
||||||
|
|
Loading…
Reference in New Issue
Block a user