The `get_dialogs()` method now returns dialogs and "entities",
which can be an User, a Chat or even a Channel.
In order to use them you may want to make use of .get_input_peer()
and .get_display_name() methods
Now RPC results can be received from the updates thread, as long
as they are errors. This, however, should not happen!
A recursive lock is now used (and released on every method, rather
than only on the `.receive()` one)
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
The module is now ready to be installed via pip
README.md has been updated to reflect these changes
Minor changes to the interactive client example
Versioning is now done by editting TelegramClient's
__version__, rather than looking for the string
Now you can let the file part size be determined
by the total file size, rather than manually
specifying one. Also, a callback function parameter
has been added (which allows to print the progress)
Fixed uploads for large files on TcpClient
Added more RPCError's for handling invalid phone code
Added more media handlers: now you're also able to
both send and download documents!
The InteractiveTelegramClient now supports working
with media aswell
Uploading and sending media are different things.
Once you have uploaded a media file, you can send
it to many users without uploading it again, since
you have a handle to the uploaded file.
Other fixes include not showing additional data
on error messages and not generating correct
code for sending bytes
Now the updates thread won't start unless you add,
at least, one updates handler. Also, if the TcpClient
was receiving (i.e., from an update), it will let the
update to be received first instead of crashing
This will allow you to, for example, send requests
when you get an update (if someone tells you something,
you can automatically reply something else). Beware,
this may lead to an infinite loop so add conditions!
A new thread is now created when MtProtoSender is created.
This thread constantly listens for Telegram updates (such as
incoming messages), so the updates can be received any time
rather than only when sending another request.
The example has been improved with more options (such as print
message history), and the TelegramClient now can retrieve the
message history from any given point in time or other offsets