Commit Graph

29 Commits

Author SHA1 Message Date
Dan
84fb959c8c Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/__init__.py
#	pyrogram/client/client.py
#	pyrogram/client/methods/bots/answer_callback_query.py
#	pyrogram/client/methods/bots/get_game_high_scores.py
#	pyrogram/client/methods/bots/get_inline_bot_results.py
#	pyrogram/client/methods/bots/request_callback_answer.py
#	pyrogram/client/methods/bots/send_game.py
#	pyrogram/client/methods/bots/send_inline_bot_result.py
#	pyrogram/client/methods/bots/set_game_score.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/iter_chat_members.py
#	pyrogram/client/methods/chats/iter_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/contacts/get_contacts.py
#	pyrogram/client/methods/messages/delete_messages.py
#	pyrogram/client/methods/messages/download_media.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/iter_history.py
#	pyrogram/client/methods/messages/send_animation.py
#	pyrogram/client/methods/messages/send_audio.py
#	pyrogram/client/methods/messages/send_cached_media.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_user_profile_photos.py
#	pyrogram/client/methods/users/get_users.py
#	pyrogram/session/auth.py
#	pyrogram/session/session.py
2019-03-16 19:49:38 +01:00
Dan
3e18945f3c Reformat code 2019-03-16 19:23:23 +01:00
Dan
4eb26c5b92 Fix sleep method calls in asyncio: time.sleep -> asyncio.sleep 2019-02-04 18:34:58 +01:00
Dan
dd86aba9d3 Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/client/dispatcher/dispatcher.py
#	pyrogram/client/methods/messages/get_history.py
2019-02-04 12:59:20 +01:00
Dan
67a35f8c7e Handle get_history flood waits
It's likely to get triggered when using iter_history (every ~3k msgs)
2019-01-27 11:13:10 +01:00
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
fbc18cace0 Update get_history docstrings 2019-01-04 15:36:43 +01:00
Dan
fe4e8c5a42 Rename get_history's "reversed" parameter to "reverse"
It was colliding with the built-in "reversed" function
2019-01-04 14:36:42 +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
f440b1f969
Add missing colon 2019-01-02 17:27:40 +01:00
Dan
4d7b1bafac Update copyright year 2019-01-01 12:36:16 +01:00
Dan
769b3ebdee Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/__init__.py
#	pyrogram/client/methods/chats/get_dialogs.py
#	pyrogram/client/methods/messages/get_history.py
2018-12-28 00:38:54 +01:00
Dan
decaa9e7f0 Rename downwards to reversed 2018-12-27 23:55:56 +01:00
Dan
233e0920a2
Merge branch 'develop' into develop 2018-12-27 23:52:40 +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
b593463bd7 Type hint all the remaining method parameters 2018-12-19 14:50:23 +01:00
Dan
603bc88aa3 Refactor get_history method 2018-12-17 14:18:41 +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
45129658b0 Revisit docstrings 2018-11-03 10:49:11 +01:00
Dan
3f7b0b25af Merge branch 'develop' into asyncio
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/client/methods/chats/get_chat_members.py
#	pyrogram/client/methods/chats/get_dialogs.py
#	pyrogram/client/methods/messages/send_animation.py
#	pyrogram/client/methods/messages/send_venue.py
2018-08-22 10:30:25 +02:00
Dan
32468e5ab0 Remove hints about using t.me/joinchat/ links as chat ids
Such links don't work reliably with the current implementation
2018-07-27 00:40:08 +02:00
Dan
f7aae28ae9
Improve get_history 2018-07-02 02:48:58 +02:00
YoilyL
357253b63e
added option to reverse get_history order
added an argument `reverse` to get_history which if set to True returns the messages from first to last instead of from newest to oldest.
2018-07-01 21:34:05 +03:00
Dan
4d72f84991 Even more async chore 2018-06-18 21:30:13 +02:00
Dan
5dff2fe604 Fix get_history in chats with less than 100 messages 2018-05-12 15:36:47 +02:00
Dan
ef93fee7aa Add new Messages object and make get_history return it 2018-05-11 18:00:16 +02:00
Dan
14f23d388c Clean get_history 2018-05-09 20:27:29 +02:00
Dan
a1c3e40800 Make parse_messages accept a list of messages 2018-05-09 19:29:23 +02:00
Dan
662d49d885 Add get_history.py 2018-05-09 13:06:32 +02:00