Commit Graph

485 Commits

Author SHA1 Message Date
Dan
2084a406a4 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/__init__.py
#	pyrogram/client/client.py
#	pyrogram/client/ext/base_client.py
#	pyrogram/client/methods/chats/get_chat_members.py
#	pyrogram/client/methods/chats/get_dialogs.py
#	pyrogram/client/methods/chats/kick_chat_member.py
#	pyrogram/client/methods/messages/get_history.py
#	pyrogram/client/methods/messages/get_messages.py
#	pyrogram/client/types/messages_and_media/messages.py
2019-01-07 08:46:28 +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
b53ba81a6a Add no_updates parameter in Client
Useful to completely disable incoming updates for batch programs
2019-01-03 11:13:24 +01:00
Dan
7f79210ba3 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/client/dispatcher/dispatcher.py
#	requirements.txt
2019-01-02 19:55:45 +01:00
Dan
4d7b1bafac Update copyright year 2019-01-01 12:36:16 +01:00
Dan
2ea1f0f323 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/client/methods/chats/get_chat.py
#	pyrogram/client/methods/messages/get_messages.py
#	pyrogram/client/types/messages_and_media/messages.py
2018-12-31 12:06:15 +01:00
Dan
64ec26850e Document save_file 2018-12-28 15:16:46 +01:00
Dan
06d8293fa0 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/__init__.py
#	pyrogram/client/client.py
#	pyrogram/client/methods/bots/send_inline_bot_result.py
#	pyrogram/client/methods/chats/pin_chat_message.py
#	pyrogram/client/methods/chats/unpin_chat_message.py
#	pyrogram/client/methods/password/change_cloud_password.py
#	pyrogram/client/methods/password/enable_cloud_password.py
#	pyrogram/client/methods/password/remove_cloud_password.py
2018-12-25 23:07:45 +01:00
Dan
d91acfe2ca Re-implement password-protected log-ins and support password recovery 2018-12-25 15:41:55 +01:00
Dan
fccadf526e Merge branch 'develop' into future
# Conflicts:
#	pyrogram/__init__.py
2018-12-25 14:36:59 +01:00
Dan
0a8a1f7771 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/__init__.py
#	pyrogram/client/client.py
2018-12-24 23:12:26 +01:00
Dan
00e4e385aa Allow bots to message old chats even if they don't exist in the session 2018-12-24 22:31:45 +01:00
Dan
84fef9ecf1 Add missing file_reference argument where applicable 2018-12-23 00:55:00 +01:00
Dan
e6667be10b Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/client/dispatcher/dispatcher.py
#	pyrogram/client/ext/utils.py
#	pyrogram/client/methods/bots/get_inline_bot_results.py
#	pyrogram/client/methods/bots/request_callback_answer.py
#	pyrogram/client/methods/bots/send_inline_bot_result.py
#	pyrogram/client/methods/chats/delete_chat_photo.py
#	pyrogram/client/methods/chats/export_chat_invite_link.py
#	pyrogram/client/methods/chats/get_chat.py
#	pyrogram/client/methods/chats/get_chat_member.py
#	pyrogram/client/methods/chats/get_chat_members.py
#	pyrogram/client/methods/chats/get_chat_members_count.py
#	pyrogram/client/methods/chats/get_dialogs.py
#	pyrogram/client/methods/chats/join_chat.py
#	pyrogram/client/methods/chats/kick_chat_member.py
#	pyrogram/client/methods/chats/leave_chat.py
#	pyrogram/client/methods/chats/pin_chat_message.py
#	pyrogram/client/methods/chats/promote_chat_member.py
#	pyrogram/client/methods/chats/restrict_chat_member.py
#	pyrogram/client/methods/chats/set_chat_description.py
#	pyrogram/client/methods/chats/set_chat_photo.py
#	pyrogram/client/methods/chats/set_chat_title.py
#	pyrogram/client/methods/chats/unban_chat_member.py
#	pyrogram/client/methods/chats/unpin_chat_message.py
#	pyrogram/client/methods/contacts/add_contacts.py
#	pyrogram/client/methods/contacts/delete_contacts.py
#	pyrogram/client/methods/messages/delete_messages.py
#	pyrogram/client/methods/messages/edit_message_caption.py
#	pyrogram/client/methods/messages/edit_message_media.py
#	pyrogram/client/methods/messages/edit_message_reply_markup.py
#	pyrogram/client/methods/messages/edit_message_text.py
#	pyrogram/client/methods/messages/forward_messages.py
#	pyrogram/client/methods/messages/get_history.py
#	pyrogram/client/methods/messages/get_messages.py
#	pyrogram/client/methods/messages/send_animation.py
#	pyrogram/client/methods/messages/send_audio.py
#	pyrogram/client/methods/messages/send_chat_action.py
#	pyrogram/client/methods/messages/send_contact.py
#	pyrogram/client/methods/messages/send_document.py
#	pyrogram/client/methods/messages/send_location.py
#	pyrogram/client/methods/messages/send_media_group.py
#	pyrogram/client/methods/messages/send_message.py
#	pyrogram/client/methods/messages/send_photo.py
#	pyrogram/client/methods/messages/send_sticker.py
#	pyrogram/client/methods/messages/send_venue.py
#	pyrogram/client/methods/messages/send_video.py
#	pyrogram/client/methods/messages/send_video_note.py
#	pyrogram/client/methods/messages/send_voice.py
#	pyrogram/client/methods/password/change_cloud_password.py
#	pyrogram/client/methods/password/enable_cloud_password.py
#	pyrogram/client/methods/password/remove_cloud_password.py
#	pyrogram/client/methods/users/delete_user_profile_photos.py
#	pyrogram/client/methods/users/get_me.py
#	pyrogram/client/methods/users/get_user_profile_photos.py
#	pyrogram/client/methods/users/get_users.py
#	pyrogram/client/methods/utilities/download_media.py
#	pyrogram/client/types/messages_and_media/message.py
2018-12-22 12:23:08 +01:00
Dan
bf0b947253 Type hint all Client methods 2018-12-19 14:55:48 +01:00
Dan
8f6f38e0b0 Merge branch 'develop' into new-parsers 2018-12-18 11:22:47 +01:00
Dan
bc824f738c Add extra warnings when sign-ins or sign-ups fail 2018-12-18 11:21:37 +01:00
Dan
c9bcf93cf7 Add extra checks in case sign-in or sign-up fails 2018-12-18 10:10:04 +01:00
Dan
914dfca574 Reformat code and optimize imports 2018-12-18 09:50:39 +01:00
Dan
6292fe8f86 Fix progress callbacks in asyncio 2018-12-15 11:24:31 +01:00
Dan
976eae63ed Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/client/methods/messages/send_media_group.py
#	pyrogram/client/methods/utilities/download_media.py
2018-12-15 11:12:30 +01:00
Dan
70470360b1 Print account name when logging in the first time 2018-12-15 11:10:25 +01:00
Dan
001a067d82 Make start and stop methods return self to make chaining possible
Suggestion by @CharlesBachman in Telegram
2018-12-15 09:50:35 +01:00
Dan
4ba5e63034 Report offset instead of 0 in case file size is missing (for file_id) 2018-12-15 08:51:20 +01:00
Dan
9c91720104 Fix broken download_media progress args 2018-12-15 08:50:08 +01:00
Dan
d5ef03d662 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/__init__.py
#	pyrogram/client/client.py
#	pyrogram/client/dispatcher/dispatcher.py
2018-11-13 20:36:04 +01:00
Dan
e400641204 Fix Dispatcher bad behaviours in case of multiple Clients running at the same time. 2018-11-13 20:31:53 +01:00
Dan
5917fffb59 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/__init__.py
2018-11-03 14:47:48 +01:00
Dan
bc4c787599 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/__init__.py
#	pyrogram/client/types/messages_and_media/message.py
#	pyrogram/connection/transport/tcp/tcp.py
2018-11-03 12:04:31 +01:00
Dan
c006ba5b30
Merge pull request #146 from TolichP/add-filesize-limit-error
Add file size limit error
2018-11-03 11:11:06 +01:00
Dan
09563067c7
Add a check for 0 B file sizes 2018-11-03 11:10:43 +01:00
Dan
45129658b0 Revisit docstrings 2018-11-03 10:49:11 +01:00
Dan
6ade4030b2 Merge branch 'develop' into asyncio 2018-10-23 15:50:15 +02:00
Dan
99bdaae365 Allow nested folders for smart plugins 2018-10-23 15:43:49 +02:00
Dan
66bcc7cde4 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/client/methods/chats/kick_chat_member.py
2018-10-21 15:56:02 +02:00
Dan
a0780d793d Apply code review suggestions 2018-10-21 14:44:29 +07:00
Dan
1fe46610cd Make plugins disabled by default
Users need to explicitly set plugins_dir parameter
2018-10-21 09:42:22 +02:00
Alexandr
ee47c21eed Add file size limit error 2018-10-19 23:39:29 +07:00
Dan
f45e3377a9 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/client/methods/users/delete_user_profile_photos.py
2018-10-16 12:20:46 +02:00
Dan
f4146a8779 Accept None as plugins_dir 2018-10-13 19:33:43 +02:00
Dan
8e238ccc9a Add plugins_dir docstrings in Client class definition 2018-10-13 11:14:26 +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
6a0066b8b5 Move loading plugins logic into a separate method 2018-10-12 17:57:34 +02:00
Dan
4bb50ee35f More logs when loading plugins 2018-10-12 17:54:52 +02:00
Dan
6c05f9ff42 Sanitize (a bit) plugins directory 2018-10-12 15:26:52 +02:00
Dan
4e516d097f Don't raise exceptions in case of non-existent plugins folder
Don't even warn in case the default plugins folder doesn't exist
2018-10-12 14:32:35 +02:00
Dan
0b79f96b4f Turn hardcoded plugins dir into a constant 2018-10-12 14:19:26 +02:00