Fix events.Raw not having ._set_client

This commit is contained in:
Lonami Exo 2018-06-04 18:35:46 +02:00
parent 3db104c7bc
commit 30ad06f29a

View File

@ -2505,7 +2505,11 @@ class TelegramClient(TelegramBareClient):
for builder, callback in self._event_builders:
event = builder.build(update)
if event:
event._set_client(self)
if hasattr(event, '_set_client'):
event._set_client(self)
else:
event._client = self
event.original_update = update
try:
callback(event)