Fix custom.Forward not using the new __slots__

This commit is contained in:
Lonami Exo 2021-09-26 18:33:03 +02:00
parent e3b1dc2059
commit 6f602a203e

View File

@ -26,7 +26,8 @@ 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__.update(original.__dict__) for slot in original.__slots__:
setattr(self, slot, getattr(original, slot))
self.original_fwd = original self.original_fwd = original
sender_id = sender = input_sender = peer = chat = input_chat = None sender_id = sender = input_sender = peer = chat = input_chat = None