Lonami Exo
383ab9b0b2
Fix message.text not checking if parse_mode was set
2019-05-20 11:57:11 +02:00
Lonami Exo
7c1c040d50
Update docstrings to have consistent style
2019-05-20 11:57:11 +02:00
Hasan
4b74d16438
Fix file_id error checking ( #1189 )
2019-05-19 22:18:35 +02:00
Lonami Exo
e5f1b2afa3
Update logging calls to use proper formatting
2019-05-17 12:30:13 +02:00
Lonami Exo
a4c2e45d6d
Handle more key errors on forward message
2019-05-17 12:30:13 +02:00
Lonami Exo
bcfc3e7550
Remove invalid error inits and move bad msg error
2019-05-15 13:58:19 +02:00
Terrance
0946a7902f
Fix super() initialisation call for EventCommon ( #1182 )
2019-05-12 23:29:01 +02:00
Lonami Exo
9730894a07
Call Chat/Sender Getter init methods
2019-05-12 14:00:12 +02:00
Lonami Exo
fefd6f0e6d
Fix use of tg://join?invite= channels
2019-05-12 13:44:09 +02:00
Lonami Exo
5754ad589f
Fix type hints for Python 3.5.2 ( #1177 )
2019-05-12 13:08:07 +02:00
Lonami Exo
4ca3517e22
Fix some type hints
2019-05-11 20:12:57 +02:00
Lonami Exo
c1be0bd2e8
Fix disconnection without a previous connection
2019-05-11 16:53:11 +02:00
Lonami Exo
278f0e9e98
Don't raise errors during disconnect
2019-05-10 18:54:10 +02:00
Lonami Exo
313caf440e
Add friendly methods for archiving dialogs
2019-05-10 18:12:16 +02:00
Lonami Exo
1828dca0b9
Support filtering by folder on iter_dialogs
2019-05-10 15:45:24 +02:00
Lonami Exo
a7443612f6
Fix download of PhotoStrippedSize to bytes
2019-05-09 18:56:54 +02:00
Lonami Exo
fbce902cf8
Fix minor documentation issue regarding pre tags
2019-05-09 14:13:43 +02:00
Lonami Exo
7f88238d8f
Update external links to the documentation
2019-05-09 14:09:22 +02:00
Lonami Exo
0a3d6106f0
Completely overhaul the documentation
2019-05-09 12:50:09 +02:00
Lonami Exo
10251f9782
Create a new Message.file property ( #1168 )
2019-05-08 18:41:40 +02:00
Lonami Exo
cfd6d3ce04
Fix catch-up when no pts is known
2019-05-08 18:15:57 +02:00
Lonami Exo
d92d989569
Quote type hints
...
Otherwise, sphinx completely butchers the documentation.
2019-05-08 17:16:09 +02:00
Lonami Exo
c6691dc6a8
Update the reference with even more types and other docs
2019-05-07 21:25:55 +02:00
Lonami Exo
8bd9dd66ab
Re-export the main modules and types from sync
...
For convenience. People can now easily replace:
from telethon import TelegramClient, events
with
from telethon.sync import TelegramClient, events
2019-05-07 10:47:25 +02:00
Lonami Exo
61613ab6ac
Create a new page with a summary of the method reference
2019-05-06 11:38:26 +02:00
Lonami Exo
744f5f50fe
Fix saving of StringSession
2019-05-06 08:55:24 +02:00
Lonami Exo
7d0efcf50f
Save pts and date only if there is something to save
2019-05-05 22:13:02 +02:00
Lonami Exo
5ed7bf7815
Fix timeout error not being excepted on Button.click
2019-05-05 19:57:09 +02:00
Lonami Exo
19398d75be
Add support for hexadecimal invite links
2019-05-05 11:56:04 +02:00
Lonami Exo
945d438696
Properly await all spawned background tasks
2019-05-04 21:02:07 +02:00
Lonami Exo
532bd1c916
Fetch difference only if it is worth it
2019-05-04 19:48:36 +02:00
Lonami Exo
f5e611e4d2
Fix SenderGetter was excepting the wrong type
2019-05-04 19:30:33 +02:00
Lonami Exo
716ab2f96d
Fix getting difference for channels and for the first time
2019-05-04 19:29:47 +02:00
Lonami Exo
adc9b4c9f1
Fix SenderGetter should not define abstract methods
...
Or at least it shouldn't if subclasses are likely to not
implement them, which causes an error if left un-implemented.
2019-05-04 17:59:21 +02:00
Lonami Exo
05fcbfd7b7
Add missing Union in hints.py
2019-05-04 12:39:48 +02:00
Lonami Exo
89c993f567
Add missing hints.py file for the previous commit
2019-05-04 10:21:21 +02:00
Lonami Exo
cd4b915522
Add type hints to all public methods in the client
2019-05-03 21:38:41 +02:00
Lonami Exo
c0e506e568
Add missing await on send_code_request
2019-05-03 21:38:41 +02:00
Lonami Exo
1e17ef1c98
Apply several lints
2019-05-03 21:38:41 +02:00
Lonami
52be689926
Only upgrade database if version < current
...
Should deal more gracefully when using new
session files in older versions of the library.
2019-05-02 23:20:39 +02:00
Lonami Exo
cb56c54351
Use the entity cache in sender getter
2019-05-02 18:51:10 +02:00
Lonami Exo
1a00de6494
Add missing checks in the message for is client None
2019-05-02 18:44:28 +02:00
Lonami Exo
b58c0d3071
Stop relying on __doc__ in EntityCache
...
This breaks when running with python -OO (optimized) which
removes the documentation but is crucial. Instead and thanks
to fce5cfea
, we can now rely on the type hints instead.
2019-05-02 10:20:49 +02:00
Lonami Exo
3a1496c205
Reuse code for _get_entity_pair
...
Less error-prone, improved the function flow for all callers,
and removed some duplicate work.
2019-05-01 17:52:32 +02:00
Lonami Exo
6d004601d0
Inline the old _load_entities code
2019-05-01 17:07:12 +02:00
Lonami Exo
e84c9847c5
Use sets instead of isinstance in StateCache too
...
Similar reasoning to the change for EntityCache, sets are faster
than attribute lookups (into types.) and isinstance (another global
lookup). Updating the state is also very common, so it should be
as fast as possible.
2019-05-01 16:37:54 +02:00
Lonami Exo
9a400748f7
Fix InlineBuilder only working with local files
2019-05-01 16:02:21 +02:00
Lonami Exo
22124b5ced
Refactor code to fetch missing entities once again
...
This is another attempt at reducing CPU usage similar to:
1b6b4a57d9
In addition it simplifies some of the code and opens up new
ideas for the state cache as well.
2019-05-01 14:02:27 +02:00
Lonami Exo
c12c65f728
Let utils.get_peer handle DialogPeer
...
This is important since some updates have a peer of
that type instead of just the normal Peer instance.
2019-05-01 12:49:36 +02:00
Lonami Exo
1dc6d226b7
Best-effort attempt at finding libssl ( #1167 )
2019-04-30 16:22:19 +02:00