Added an .empty() function to the objects, fixes to msgs_ack

The .empty() function returns an "empty" instance of the object
(attributes set to None). This is used rather than using reflection.

The msgs_ack handling broke stuff (InvokeWithLayer when there were
updates), so this is now handled; yet there may be a better fix
This commit is contained in:
Lonami
2016-09-26 17:16:15 +02:00
parent ded655911e
commit 77aa37d2ad
4 changed files with 25 additions and 13 deletions

View File

@@ -85,6 +85,9 @@ class TelegramClient:
# We're only interested in the DC options,
# although many other options are available!
self.dc_options = result.dc_options
# We can now enable these (for such methods such as logout)
self.sender.ack_requests_confirm = True
return True
except RPCError as error:
print('Could not stabilise initial connection: {}'.format(error))