Commit Graph

555 Commits

Author SHA1 Message Date
Lonami Exo
edd73ed69a Allow switching from IPv4 to IPv6 and vice versa 2017-11-16 13:40:25 +01:00
Vladislav Kolesnichenko
ee5915e86d Add support for connecting through IPv6 (#425 for #112) 2017-11-16 13:30:18 +01:00
Lonami Exo
959e824c1c Reduce indent level to simplify flow on __call__ 2017-11-16 13:26:49 +01:00
Lonami Exo
778c844a64 Use logger.exception instead logger.error on ReadThread 2017-11-16 13:25:13 +01:00
Lonami Exo
b346561f89 Remove unnecessary call to .get_input_entity() 2017-11-16 13:24:32 +01:00
Lonami
48e96ca15f
Fix ._get_connected failing when .fileno() == 0 ( #427) 2017-11-14 12:01:33 +01:00
Lonami Exo
bfc408b00a Use NullHandler as default for the library 2017-11-13 10:59:43 +01:00
Lonami Exo
4ac88a1505 Use ._logger.exception when .connect fails (#373) 2017-11-13 10:58:10 +01:00
Lonami Exo
07cb001854 Attempt at cleaning up reconnection logic 2017-11-13 10:31:32 +01:00
Lonami Exo
f3e2887452 Add missing ChannelFull case to .get_peer_id() 2017-11-12 18:15:32 +01:00
Lonami Exo
08abef78d6 Add missing InputUserSelf case to .get_input_peer() 2017-11-12 18:05:01 +01:00
Andrey Egorov
84d48ef7bf Safer check to determine whether sockets are connected (#427) 2017-11-12 16:51:32 +01:00
Lonami Exo
99512875a2 Reconnect if invoking failed (#270) 2017-11-12 16:25:56 +01:00
Lonami Exo
5a57a8a498 Fix message history failing if sender fwd from channel
Closes #424
2017-11-11 19:35:57 +01:00
Lonami Exo
81baced12b Support t.me/ links when resolving usernames/joinchat links
Closes #419
2017-11-10 13:27:51 +01:00
Lonami Exo
c4e07cff57 Fix unfinished markdown delimiters being stripped away 2017-11-10 11:44:27 +01:00
Lonami Exo
cb3f20db65 Clean up markdown parsing since tuples aren't used anymore 2017-11-10 11:41:49 +01:00
Lonami Exo
7d75eebdab Make markdown parser use only Telegram's MessageEntity's 2017-11-10 11:07:36 +01:00
Lonami Exo
cad1e883a6 Don't save full entities unless they have access_hash 2017-11-10 09:32:40 +01:00
Lonami Exo
f65322af18 Fix entity database not using the phone on {phone: id}
Closes #412
2017-11-07 10:15:55 +01:00
Lonami Exo
83af705cc8 Add more comments to the markdown parser 2017-11-06 11:32:40 +01:00
Lonami Exo
3a2c3a9497 Fix URL regex for markdown was greedy (fix-up) 2017-11-06 11:22:58 +01:00
Lonami Exo
07ece83aba Fix overlapping markdown entities being skipped 2017-11-06 10:37:22 +01:00
Lonami Exo
4f80429215 Work on byte level when parsing markdown
Reasoning: instead encoding every character one by one as we
encounter them to use half their length as the correct offset,
we can simply encode the whole string at once as utf-16le and
work with that directly.
2017-11-06 10:29:32 +01:00
Viktor Oreshkin
49eb281251 Proper offset calculation for markdown (#407)
Dan suca
If Dan shared it with Traitor I'll not have to spend my time on this
Not a, sorry for not letting you sleep
k thx bye
Will this stay in history?
2017-11-06 00:17:22 +01:00
Lonami Exo
f381b26790 Add optional force_sms parameter to .send_code_request() 2017-11-04 20:46:02 +01:00
Lonami Exo
c8a0953f8e Update to v0.15.4 2017-11-04 13:40:56 +01:00
Lonami Exo
1741608f28 Use larger batches for .get_dialogs(limit=None) 2017-11-04 12:35:12 +01:00
Dan
0bfd8ff032 Add much faster integer factorization (#403 related to #199) 2017-11-03 12:59:17 +01:00
Lonami Exo
9a12738f0e Fix .get_message_history not working with limit=0 2017-10-31 13:52:43 +01:00
Lonami Exo
3d6c8915e3 Allow >100 limits when getting message history (implements #290) 2017-10-31 12:52:07 +01:00
Lonami
6c2363acd2
Merge pull request #396 from LonamiWebs/md-parsing
Support markdown again (implements  #118)
2017-10-30 11:19:48 +01:00
Lonami Exo
7e204632e2 Add parse_mode parameter to TelegramClient.send_message() 2017-10-30 11:17:22 +01:00
Lonami Exo
82cac4836c Fix markdown URL parsing using character index instead offset 2017-10-30 11:15:53 +01:00
Lonami Exo
0a14aa1bc6 Remove additional check when calculating emojies length
This special check treated some emojies as 3 characters long but
this shouldn't have actually been done, likely due to the old
regex matching more things as emoji than it should (which would
have count as 2 too, making up for 1+3 from the new is_emoji()).
2017-10-30 10:56:39 +01:00
Lonami Exo
05f7f076d5 Fix InputPeer* with None hash, drop them off database (closes #354) 2017-10-30 10:33:45 +01:00
Lonami Exo
05626c8274 Implement missing .to_dict() and .stringify() on message/container 2017-10-29 20:13:36 +01:00
Lonami Exo
6567f4b567 Clean .download_contact and a wrong indent level 2017-10-29 20:13:36 +01:00
Lonami Exo
2609bd9bd1 Use constants and allow empty URL regex when parsing markdown 2017-10-29 18:21:21 +01:00
Lonami Exo
d47a9f83d0 Fix some special cases which are not treated as emojis (offset 1) 2017-10-29 17:07:37 +01:00
Lonami Exo
bcaa8007a3 Fix inline URL matching swallowing all parse entities 2017-10-29 16:43:30 +01:00
Lonami Exo
f5fafc6a27 Enhance emoji detection 2017-10-29 16:41:30 +01:00
Lonami Exo
368269cb11 Add ability to parse inline URLs 2017-10-29 16:33:10 +01:00
Lonami Exo
9600a9ea0b Fix markdown parsing failing if delimiter was last character 2017-10-28 19:17:18 +02:00
Lonami Exo
5adec2e1ab Initial attempt at parsing Markdown-like syntax 2017-10-28 19:06:41 +02:00
Andrei Fokau
ef794bf75d Fix importing dependencies during installing (#384) 2017-10-28 12:21:07 +02:00
Lonami Exo
e48f15be80 Fix-up af08d59 (missing parenthesis) 2017-10-28 11:11:51 +02:00
Tanuj
af08d59cb7 Fix bug with semicolons when downloading contacts (#319) 2017-10-28 11:09:46 +02:00
Lonami Exo
c6d30ffceb Fix exception when logging exceptions 2017-10-25 13:06:51 +02:00
Lonami Exo
3db13ccdd2 Add a more descriptive error when serializing bytes 2017-10-25 12:43:57 +02:00