Commit Graph

55 Commits

Author SHA1 Message Date
Dan
42c9bafa0c Update copyright notice 2020-02-01 14:04:33 +01:00
Dan
481e4ee339 Set the updates workers pool from 1 to 4 2019-09-08 11:59:26 +02:00
Dan
7daf51af9b Split start() into reusable methods
This allows custom authorization processes to be implemented much more
easily. Refactors #281
2019-08-13 13:15:58 +02:00
Dan
385ab22b68 Rework Client.idle()
idle() is now static and doesn't stop the client anymore
2019-07-11 19:59:56 +02:00
Dan
fed8cbf87e Add new set_parse_mode utility method 2019-07-11 19:28:33 +02:00
Dan
f05e79e0f4 Update usages of Parser all around the library 2019-06-26 16:08:24 +02:00
Dan
30192de1ad Update pyrogram/client to accommodate Storage Engines 2019-06-19 16:10:37 +02:00
Dan
682591ea8f Update Auth and Session to accommodate Storage Engines 2019-06-19 16:02:29 +02:00
Dan
142d5ab335 Merge branch 'develop' into session_storage
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/client/ext/base_client.py
#	pyrogram/client/ext/syncer.py
#	pyrogram/client/methods/contacts/get_contacts.py
2019-06-15 23:52:34 +02:00
Dan
80d8443be4 Fix script executions not working outside the current directory
Fixes #41
2019-06-15 23:02:31 +02:00
Dan
61ed44ff5f Add edit_inline_* methods to deal with inline messages only 2019-06-14 04:52:05 +02:00
Dan
da4ff268a4 Add edit, edit_caption, edit_media and edit_reply_markup bound methods to the CallbackQuery type 2019-06-14 02:46:27 +02:00
Dan
22199b0fe5 Implement editing of messages sent via inline bots
- edit_message_text
- edit_message_caption
- edit_message_media
- edit_message_reply_markup
2019-06-14 02:15:33 +02:00
Dan
c65e210c03 Fix FileData namedtuple using Python 3.7+ features 2019-06-07 18:48:34 +02:00
Dan
d243ebc2cd Performance improvements 2019-06-01 13:18:48 +02:00
Dan
a984558860 Rename methods dealing with profile pictures 2019-05-31 00:20:09 +02:00
Dan
55599e33c6 Rework download_media to accommodate L100 changes 2019-05-29 10:40:37 +02:00
Dan
518220431e Docs revamp. Part 5 2019-05-18 01:45:01 +02:00
Dan
01f0af6bb0 Increase OFFLINE_SLEEP to 15 minutes
This avoid frequent dialogs fetch while debugging with user accounts
2019-05-06 16:36:57 +02:00
Dan
63d76a7f13 Bring back automatic mime type detection for new uploads (fixes #239)
- Add mime.types file to contain a good database of type -> ext mappings
  from svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types

- Load mime.type at BaseClient creation and add two convenience methods
  for guessing mime types from filenames and extensions from mime types,
  guess_mime_type and guess_extension

- Make all send_* method as well as download_media use the new mime type
  database via guess_mime_type and guess_extension methods
2019-04-20 18:56:30 +02:00
bakatrouble
952f0627f1 Merge branch 'develop' into session_storage
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/client/ext/base_client.py
#	pyrogram/client/ext/syncer.py
#	pyrogram/client/style/html.py
#	pyrogram/client/style/markdown.py
2019-04-14 21:49:45 +03:00
Dan
ef5dd96bdc Fix broken mentions for both HTML and Markdown 2019-03-26 13:32:30 +01:00
Dan
fede74398c Fix inline-mode branch breaking after many commits from develop 2019-03-21 18:37:00 +01:00
bakatrouble
f84f9ec4df Add bot_token argument (#221)
* Add bot_token argument (closes #123)

* Make session_name docs more readable and detailed

* Explicitely set is_bot=False
2019-03-01 18:30:39 +01:00
bakatrouble
260043d8ec Unify peers cache 2019-02-26 19:24:00 +03:00
bakatrouble
5dc33c6337 add in-memory session storage, refactor session storages, remove mixin 2019-02-22 03:37:19 +03:00
bakatrouble
9c4e9e166e Merge #221, string sessions now work for bots too 2019-02-22 02:13:51 +03:00
bakatrouble
fd5889d69e Merge branch 'bot_token_arg' into session_storage
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/client/ext/base_client.py
#	pyrogram/client/ext/syncer.py
2019-02-22 01:59:21 +03:00
bakatrouble
5cc9a452eb Add bot_token argument (closes #123) 2019-02-22 01:34:08 +03:00
bakatrouble
9d32b28f94 Implement extendable session storage and JSON session storage 2019-02-21 20:12:11 +03:00
Dan
44deabf399 Update iter_chat_members efficiency 2019-01-24 17:21:41 +01:00
Dan
c28b9f9a2c Add StopTransmission custom exception
Useful for stopping up/downloads after they started
2019-01-11 14:00:03 +01:00
Dan
153439ac88 Add iter_chat_members method. Reference #170 2019-01-04 17:13:44 +01:00
Dan
948f2b44ed Add iter_dialogs method. Reference #170 2019-01-04 16:10:34 +01:00
Dan
fe89974523 Add get_history signature to BaseClient
Also make other method parameters generic
2019-01-04 14:37:26 +01:00
Dan
4f6990d735 Add takeout parameter in Client
This lets the client use a takeout session instead of a normal one.
Takeout sessions are useful for exporting Telegram data. Methods invoked
inside a takeout session are less prone to throw FloodWait exceptions.
2019-01-03 12:20:42 +01:00
Dan
372bbabe28 Make invite links of public channels work with get_chat 2019-01-02 22:39:16 +01:00
Dan
4d7b1bafac Update copyright year 2019-01-01 12:36:16 +01:00
Dan
39636f2843 Update get_messages signature 2018-10-28 17:18:00 +01:00
Dan
1fe46610cd Make plugins disabled by default
Users need to explicitly set plugins_dir parameter
2018-10-21 09:42:22 +02:00
Dan
345ac6e16a Merge branch 'develop' into plugins 2018-10-13 10:42:07 +02:00
Dan
9649b1457c Don't make use of hardcoded default int values too 2018-10-13 10:41:58 +02:00
Dan
340fb9c145 Merge branch 'develop' into plugins
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/client/ext/base_client.py
2018-10-13 10:39:47 +02:00
Dan
a32009a79d Don't make use of hardcoded default string values 2018-10-13 10:38:44 +02:00
Dan
0b79f96b4f Turn hardcoded plugins dir into a constant 2018-10-12 14:19:26 +02:00
Dan
2779e33d13 Rename "token" to "bot_token" 2018-09-10 19:55:53 +02:00
Dan
21d914e414 Remove unused constant 2018-08-19 19:40:23 +02:00
Dan
6cc87d50c9 Rename media type id to animation 2018-08-06 21:32:38 +02:00
Dan
f4c0793a0b Make session leaner by removing some redundant parameters
Related to #86
2018-06-24 18:27:41 +02:00
Dan
69d1432251 Allow user-defined values for retries and timeout 2018-06-24 17:47:29 +02:00