From cd3649448cdbde1eda8d0a1adde9387c85ad66ac Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Mon, 17 Sep 2018 18:44:13 +0200
Subject: [PATCH 01/21] Add CHAT_WRITE_FORBIDDEN error
---
compiler/error/source/403_FORBIDDEN.tsv | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 compiler/error/source/403_FORBIDDEN.tsv
diff --git a/compiler/error/source/403_FORBIDDEN.tsv b/compiler/error/source/403_FORBIDDEN.tsv
new file mode 100644
index 00000000..7bacbe7d
--- /dev/null
+++ b/compiler/error/source/403_FORBIDDEN.tsv
@@ -0,0 +1,2 @@
+id message
+CHAT_WRITE_FORBIDDEN You don't have rights to send messages in this chat
\ No newline at end of file
From f850d6352ed160fda27721209f14fdf2805d1920 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Mon, 17 Sep 2018 18:53:04 +0200
Subject: [PATCH 02/21] Enhance API by adding support for Context Managers.
Closes #122 A batch script would be as simple as this example:
from pyrogram import Client
with Client("...") as app:
app.send_message("haskell", "hi")
---
pyrogram/client/client.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py
index 97002e79..f501c01a 100644
--- a/pyrogram/client/client.py
+++ b/pyrogram/client/client.py
@@ -183,6 +183,13 @@ class Client(Methods, BaseClient):
self.dispatcher = Dispatcher(self, workers)
+ def __enter__(self):
+ self.start()
+ return self
+
+ def __exit__(self, exc_type, exc_val, exc_tb):
+ self.stop()
+
@property
def proxy(self):
return self._proxy
From 19d04ca94fe3d6b79e2bf54ef925ea5e141a32e6 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Tue, 18 Sep 2018 11:35:19 +0200
Subject: [PATCH 03/21] Reword Audio thumb description
---
pyrogram/client/types/messages_and_media/audio.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyrogram/client/types/messages_and_media/audio.py b/pyrogram/client/types/messages_and_media/audio.py
index 57731266..37f91992 100644
--- a/pyrogram/client/types/messages_and_media/audio.py
+++ b/pyrogram/client/types/messages_and_media/audio.py
@@ -30,7 +30,7 @@ class Audio(Object):
Duration of the audio in seconds as defined by sender.
thumb (:obj:`PhotoSize `, *optional*):
- Audio thumbnail.
+ Thumbnail of the music file album cover.
file_name (``str``, *optional*):
Audio file name.
From 28af5e14b4a2b23c4e57994c9c769fff660b4899 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Tue, 18 Sep 2018 11:36:20 +0200
Subject: [PATCH 04/21] Add "thumb" field for all InputMedia types except Photo
---
.../client/types/input_media/input_media_animation.py | 8 ++++++++
pyrogram/client/types/input_media/input_media_audio.py | 8 ++++++++
.../client/types/input_media/input_media_document.py | 9 +++++++++
pyrogram/client/types/input_media/input_media_video.py | 8 ++++++++
4 files changed, 33 insertions(+)
diff --git a/pyrogram/client/types/input_media/input_media_animation.py b/pyrogram/client/types/input_media/input_media_animation.py
index 12fe0e03..14f8c2de 100644
--- a/pyrogram/client/types/input_media/input_media_animation.py
+++ b/pyrogram/client/types/input_media/input_media_animation.py
@@ -28,6 +28,12 @@ class InputMediaAnimation(InputMedia):
Pass a file_id as string to send a file that exists on the Telegram servers or
pass a file path as string to upload a new file that exists on your local machine.
+ thumb (``str``, *optional*):
+ Thumbnail of the animation file sent.
+ The thumbnail should be in JPEG format and less than 200 KB in size.
+ A thumbnail's width and height should not exceed 90 pixels.
+ Thumbnails can't be reused and can be only uploaded as a new file.
+
caption (``str``, *optional*):
Caption of the animation to be sent, 0-200 characters
@@ -48,6 +54,7 @@ class InputMediaAnimation(InputMedia):
def __init__(self,
media: str,
+ thumb: str = None,
caption: str = "",
parse_mode: str = "",
width: int = 0,
@@ -55,6 +62,7 @@ class InputMediaAnimation(InputMedia):
duration: int = 0):
super().__init__(media, caption, parse_mode)
+ self.thumb = thumb
self.width = width
self.height = height
self.duration = duration
diff --git a/pyrogram/client/types/input_media/input_media_audio.py b/pyrogram/client/types/input_media/input_media_audio.py
index 2c644107..83979b4a 100644
--- a/pyrogram/client/types/input_media/input_media_audio.py
+++ b/pyrogram/client/types/input_media/input_media_audio.py
@@ -29,6 +29,12 @@ class InputMediaAudio(InputMedia):
Pass a file_id as string to send an audio that exists on the Telegram servers or
pass a file path as string to upload a new audio that exists on your local machine.
+ thumb (``str``, *optional*):
+ Thumbnail of the music file album cover.
+ The thumbnail should be in JPEG format and less than 200 KB in size.
+ A thumbnail's width and height should not exceed 90 pixels.
+ Thumbnails can't be reused and can be only uploaded as a new file.
+
caption (``str``, *optional*):
Caption of the audio to be sent, 0-200 characters
@@ -49,6 +55,7 @@ class InputMediaAudio(InputMedia):
def __init__(self,
media: str,
+ thumb: str = None,
caption: str = "",
parse_mode: str = "",
duration: int = 0,
@@ -56,6 +63,7 @@ class InputMediaAudio(InputMedia):
title: str = ""):
super().__init__(media, caption, parse_mode)
+ self.thumb = thumb
self.duration = duration
self.performer = performer
self.title = title
diff --git a/pyrogram/client/types/input_media/input_media_document.py b/pyrogram/client/types/input_media/input_media_document.py
index f64da619..07965534 100644
--- a/pyrogram/client/types/input_media/input_media_document.py
+++ b/pyrogram/client/types/input_media/input_media_document.py
@@ -28,6 +28,12 @@ class InputMediaDocument(InputMedia):
Pass a file_id as string to send a file that exists on the Telegram servers or
pass a file path as string to upload a new file that exists on your local machine.
+ thumb (``str``):
+ Thumbnail of the file sent.
+ The thumbnail should be in JPEG format and less than 200 KB in size.
+ A thumbnail's width and height should not exceed 90 pixels.
+ Thumbnails can't be reused and can be only uploaded as a new file.
+
caption (``str``, *optional*):
Caption of the document to be sent, 0-200 characters
@@ -39,6 +45,9 @@ class InputMediaDocument(InputMedia):
def __init__(self,
media: str,
+ thumb: str = None,
caption: str = "",
parse_mode: str = ""):
super().__init__(media, caption, parse_mode)
+
+ self.thumb = thumb
diff --git a/pyrogram/client/types/input_media/input_media_video.py b/pyrogram/client/types/input_media/input_media_video.py
index c1f2c9ac..54ce5e5e 100644
--- a/pyrogram/client/types/input_media/input_media_video.py
+++ b/pyrogram/client/types/input_media/input_media_video.py
@@ -30,6 +30,12 @@ class InputMediaVideo(InputMedia):
pass a file path as string to upload a new video that exists on your local machine.
Sending video by a URL is currently unsupported.
+ thumb (``str``):
+ Thumbnail of the video sent.
+ The thumbnail should be in JPEG format and less than 200 KB in size.
+ A thumbnail's width and height should not exceed 90 pixels.
+ Thumbnails can't be reused and can be only uploaded as a new file.
+
caption (``str``, *optional*):
Caption of the video to be sent, 0-200 characters
@@ -53,6 +59,7 @@ class InputMediaVideo(InputMedia):
def __init__(self,
media: str,
+ thumb: str = None,
caption: str = "",
parse_mode: str = "",
width: int = 0,
@@ -61,6 +68,7 @@ class InputMediaVideo(InputMedia):
supports_streaming: bool = True):
super().__init__(media, caption, parse_mode)
+ self.thumb = thumb
self.width = width
self.height = height
self.duration = duration
From 61e6e58be7410d055ff65cdab201aa78a0b21592 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Tue, 18 Sep 2018 11:36:52 +0200
Subject: [PATCH 05/21] Reword send_animation's thumb parameter description
---
pyrogram/client/methods/messages/send_animation.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pyrogram/client/methods/messages/send_animation.py b/pyrogram/client/methods/messages/send_animation.py
index 55123332..30f28b30 100644
--- a/pyrogram/client/methods/messages/send_animation.py
+++ b/pyrogram/client/methods/messages/send_animation.py
@@ -73,9 +73,10 @@ class SendAnimation(BaseClient):
Animation height.
thumb (``str``, *optional*):
- Animation thumbnail.
- Pass a file path as string to send an image that exists on your local machine.
- Thumbnail should have 90 or less pixels of width and 90 or less pixels of height.
+ Thumbnail of the animation file sent.
+ The thumbnail should be in JPEG format and less than 200 KB in size.
+ A thumbnail's width and height should not exceed 90 pixels.
+ Thumbnails can't be reused and can be only uploaded as a new file.
disable_notification (``bool``, *optional*):
Sends the message silently.
From 42ea51cb77f47ee2d8bdfbde891270c686b256f5 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Tue, 18 Sep 2018 11:37:11 +0200
Subject: [PATCH 06/21] Make send_document and send_video_note accept a
thumbnail #119
---
pyrogram/client/methods/messages/send_document.py | 9 +++++++++
pyrogram/client/methods/messages/send_video_note.py | 9 +++++++++
2 files changed, 18 insertions(+)
diff --git a/pyrogram/client/methods/messages/send_document.py b/pyrogram/client/methods/messages/send_document.py
index 01c3eca5..28d93f07 100644
--- a/pyrogram/client/methods/messages/send_document.py
+++ b/pyrogram/client/methods/messages/send_document.py
@@ -30,6 +30,7 @@ class SendDocument(BaseClient):
def send_document(self,
chat_id: int or str,
document: str,
+ thumb: str = None,
caption: str = "",
parse_mode: str = "",
disable_notification: bool = None,
@@ -51,6 +52,12 @@ class SendDocument(BaseClient):
pass an HTTP URL as a string for Telegram to get a file from the Internet, or
pass a file path as string to upload a new file that exists on your local machine.
+ thumb (``str``):
+ Thumbnail of the file sent.
+ The thumbnail should be in JPEG format and less than 200 KB in size.
+ A thumbnail's width and height should not exceed 90 pixels.
+ Thumbnails can't be reused and can be only uploaded as a new file.
+
caption (``str``, *optional*):
Document caption, 0-200 characters.
@@ -103,10 +110,12 @@ class SendDocument(BaseClient):
style = self.html if parse_mode.lower() == "html" else self.markdown
if os.path.exists(document):
+ thumb = None if thumb is None else self.save_file(thumb)
file = self.save_file(document, progress=progress, progress_args=progress_args)
media = types.InputMediaUploadedDocument(
mime_type=mimetypes.types_map.get("." + document.split(".")[-1], "text/plain"),
file=file,
+ thumb=thumb,
attributes=[
types.DocumentAttributeFilename(os.path.basename(document))
]
diff --git a/pyrogram/client/methods/messages/send_video_note.py b/pyrogram/client/methods/messages/send_video_note.py
index 6adc6497..6da1962a 100644
--- a/pyrogram/client/methods/messages/send_video_note.py
+++ b/pyrogram/client/methods/messages/send_video_note.py
@@ -32,6 +32,7 @@ class SendVideoNote(BaseClient):
video_note: str,
duration: int = 0,
length: int = 1,
+ thumb: str = None,
disable_notification: bool = None,
reply_to_message_id: int = None,
reply_markup=None,
@@ -57,6 +58,12 @@ class SendVideoNote(BaseClient):
length (``int``, *optional*):
Video width and height.
+ thumb (``str``, *optional*):
+ Thumbnail of the video sent.
+ The thumbnail should be in JPEG format and less than 200 KB in size.
+ A thumbnail's width and height should not exceed 90 pixels.
+ Thumbnails can't be reused and can be only uploaded as a new file.
+
disable_notification (``bool``, *optional*):
Sends the message silently.
Users will receive a notification with no sound.
@@ -100,10 +107,12 @@ class SendVideoNote(BaseClient):
file = None
if os.path.exists(video_note):
+ thumb = None if thumb is None else self.save_file(thumb)
file = self.save_file(video_note, progress=progress, progress_args=progress_args)
media = types.InputMediaUploadedDocument(
mime_type=mimetypes.types_map[".mp4"],
file=file,
+ thumb=thumb,
attributes=[
types.DocumentAttributeVideo(
round_message=True,
From 500ec09b47416c3e6464ca43b12fc5db1161d349 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Tue, 18 Sep 2018 19:16:55 +0200
Subject: [PATCH 07/21] Clean up load_config
---
pyrogram/client/client.py | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py
index f501c01a..3ca979de 100644
--- a/pyrogram/client/client.py
+++ b/pyrogram/client/client.py
@@ -910,8 +910,6 @@ class Client(Methods, BaseClient):
if getattr(self, option):
pass
else:
- setattr(self, option, Client.APP_VERSION)
-
if parser.has_section("pyrogram"):
setattr(self, option, parser.get(
"pyrogram",
@@ -919,18 +917,6 @@ class Client(Methods, BaseClient):
fallback=getattr(Client, option.upper())
))
- if self.lang_code:
- pass
- else:
- self.lang_code = Client.LANG_CODE
-
- if parser.has_section("pyrogram"):
- self.lang_code = parser.get(
- "pyrogram",
- "lang_code",
- fallback=Client.LANG_CODE
- )
-
if self._proxy:
self._proxy["enabled"] = True
else:
From 8b364202c3ee50b8d152c857d9dfb1b61c72356d Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Tue, 18 Sep 2018 19:17:28 +0200
Subject: [PATCH 08/21] Use list instead of set
---
pyrogram/client/client.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py
index 3ca979de..1f25c537 100644
--- a/pyrogram/client/client.py
+++ b/pyrogram/client/client.py
@@ -906,7 +906,7 @@ class Client(Methods, BaseClient):
"More info: https://docs.pyrogram.ml/start/ProjectSetup#configuration"
)
- for option in {"app_version", "device_model", "system_version", "lang_code"}:
+ for option in ["app_version", "device_model", "system_version", "lang_code"]:
if getattr(self, option):
pass
else:
From 84492fb942adb3febc05e73ff99d57b5634fdb9c Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Tue, 18 Sep 2018 21:28:44 +0200
Subject: [PATCH 09/21] Add an extra warning in case connection fails
---
pyrogram/connection/connection.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyrogram/connection/connection.py b/pyrogram/connection/connection.py
index e10011d1..8020bc71 100644
--- a/pyrogram/connection/connection.py
+++ b/pyrogram/connection/connection.py
@@ -66,6 +66,7 @@ class Connection:
))
break
else:
+ log.warning("Connection failed! Trying again...")
raise TimeoutError
def close(self):
From 7aee163ddd14d85c3cf3c3d2c2a3df92dd1be6cd Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 11:53:26 +0200
Subject: [PATCH 10/21] Update docs reported version
---
docs/source/start/Installation.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/source/start/Installation.rst b/docs/source/start/Installation.rst
index bba927e4..d3ddfe7d 100644
--- a/docs/source/start/Installation.rst
+++ b/docs/source/start/Installation.rst
@@ -45,7 +45,7 @@ If no error shows up you are good to go.
>>> import pyrogram
>>> pyrogram.__version__
- '0.7.5'
+ '0.8.0'
.. _TgCrypto: https://docs.pyrogram.ml/resources/TgCrypto
.. _develop: http://github.com/pyrogram/pyrogram
\ No newline at end of file
From 8adcb34108c45d60f41c1299930278f5ee19d73e Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 11:58:48 +0200
Subject: [PATCH 11/21] Update docs logo and badges
---
docs/source/index.rst | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/docs/source/index.rst b/docs/source/index.rst
index ec6b24f2..0f8a6bf0 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -5,8 +5,7 @@ Welcome to Pyrogram
@@ -26,11 +25,11 @@ Welcome to Pyrogram
-
-
From 666c41a79df3afdf2cf4540c389c532a8d23f25d Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 12:13:54 +0200
Subject: [PATCH 12/21] Add missing methods to docs
---
docs/source/pyrogram/Client.rst | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/docs/source/pyrogram/Client.rst b/docs/source/pyrogram/Client.rst
index 45d40368..1cd1a072 100644
--- a/docs/source/pyrogram/Client.rst
+++ b/docs/source/pyrogram/Client.rst
@@ -57,10 +57,10 @@ Messages
edit_message_text
edit_message_caption
edit_message_reply_markup
+ edit_message_media
delete_messages
get_messages
get_history
- get_dialogs
Chats
-----
@@ -84,6 +84,8 @@ Chats
get_chat
get_chat_member
get_chat_members
+ get_chat_members_count
+ get_dialogs
Users
-----
From 9538ed85fecbf8fa106315fdb2ca6906aae1f55e Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 13:20:36 +0200
Subject: [PATCH 13/21] Fix missing backtick
---
pyrogram/client/methods/chats/get_chat_members_count.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyrogram/client/methods/chats/get_chat_members_count.py b/pyrogram/client/methods/chats/get_chat_members_count.py
index efe53c19..41650bdd 100644
--- a/pyrogram/client/methods/chats/get_chat_members_count.py
+++ b/pyrogram/client/methods/chats/get_chat_members_count.py
@@ -32,7 +32,7 @@ class GetChatMembersCount(BaseClient):
On success, an integer is returned.
Raises:
- :class:`Error
+ :class:`Error `
``ValueError``: If a chat_id belongs to user.
"""
peer = self.resolve_peer(chat_id)
From dcd087ba63b54095a5769833a6c75e295c7bb144 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 14:31:51 +0200
Subject: [PATCH 14/21] Revert "Revert "Update tgcrypto function names""
This reverts commit 0f0e757
---
pyrogram/crypto/aes.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pyrogram/crypto/aes.py b/pyrogram/crypto/aes.py
index e4fb94b1..065a5b4d 100644
--- a/pyrogram/crypto/aes.py
+++ b/pyrogram/crypto/aes.py
@@ -30,19 +30,19 @@ try:
# TODO: Use new tgcrypto function names
@classmethod
def ige256_encrypt(cls, data: bytes, key: bytes, iv: bytes) -> bytes:
- return tgcrypto.ige_encrypt(data, key, iv)
+ return tgcrypto.ige256_encrypt(data, key, iv)
@classmethod
def ige256_decrypt(cls, data: bytes, key: bytes, iv: bytes) -> bytes:
- return tgcrypto.ige_decrypt(data, key, iv)
+ return tgcrypto.ige256_decrypt(data, key, iv)
@staticmethod
def ctr256_encrypt(data: bytes, key: bytes, iv: bytearray, state: bytearray = None) -> bytes:
- return tgcrypto.ctr_encrypt(data, key, iv, state or bytearray(1))
+ return tgcrypto.ctr256_encrypt(data, key, iv, state or bytearray(1))
@staticmethod
def ctr256_decrypt(data: bytes, key: bytes, iv: bytearray, state: bytearray = None) -> bytes:
- return tgcrypto.ctr_decrypt(data, key, iv, state or bytearray(1))
+ return tgcrypto.ctr256_decrypt(data, key, iv, state or bytearray(1))
@staticmethod
def xor(a: bytes, b: bytes) -> bytes:
From 6ce71b404fa8109285ce8cd3ea98aeddfb3c49a7 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 14:31:55 +0200
Subject: [PATCH 15/21] Revert "Revert "Remove TODO""
This reverts commit d2d4f55
---
pyrogram/crypto/aes.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/pyrogram/crypto/aes.py b/pyrogram/crypto/aes.py
index 065a5b4d..f16688c4 100644
--- a/pyrogram/crypto/aes.py
+++ b/pyrogram/crypto/aes.py
@@ -27,7 +27,6 @@ try:
class AES:
- # TODO: Use new tgcrypto function names
@classmethod
def ige256_encrypt(cls, data: bytes, key: bytes, iv: bytes) -> bytes:
return tgcrypto.ige256_encrypt(data, key, iv)
From 0f6e5ef29810dd4b89151a1c6e8c1b5b13f2bffe Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 14:35:45 +0200
Subject: [PATCH 16/21] Use a stricter tgcrypto version requirement
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index b8d5c274..ee0fed9b 100644
--- a/setup.py
+++ b/setup.py
@@ -172,7 +172,7 @@ setup(
packages=find_packages(exclude=["compiler*"]),
zip_safe=False,
install_requires=read("requirements.txt"),
- extras_require={"tgcrypto": ["tgcrypto>=1.0.4"]},
+ extras_require={"tgcrypto": ["tgcrypto==1.1.0"]},
cmdclass={
"clean": Clean,
"generate": Generate
From 9ef8c786e47438cdf3628fb545e3647840b4f3b6 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 16:23:33 +0200
Subject: [PATCH 17/21] Update tgcrypto required version
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index ee0fed9b..10789e98 100644
--- a/setup.py
+++ b/setup.py
@@ -172,7 +172,7 @@ setup(
packages=find_packages(exclude=["compiler*"]),
zip_safe=False,
install_requires=read("requirements.txt"),
- extras_require={"tgcrypto": ["tgcrypto==1.1.0"]},
+ extras_require={"tgcrypto": ["tgcrypto==1.1.1"]},
cmdclass={
"clean": Clean,
"generate": Generate
From 08f6d0b865480146724f9e8aa3dbe3071b78e0bf Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 16:24:30 +0200
Subject: [PATCH 18/21] Fix tgcrypto version in docs index page
---
docs/source/index.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 0f8a6bf0..6e740dd0 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -29,7 +29,7 @@ Welcome to Pyrogram
alt="Scheme Layer">
-
From 3a858e6a57c36df41e2b843358c51b7919fa1a67 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 17:30:23 +0200
Subject: [PATCH 19/21] Fix config values not being available when not using
config.ini file
---
pyrogram/client/client.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py
index 1f25c537..3d8911a7 100644
--- a/pyrogram/client/client.py
+++ b/pyrogram/client/client.py
@@ -916,6 +916,8 @@ class Client(Methods, BaseClient):
option,
fallback=getattr(Client, option.upper())
))
+ else:
+ setattr(self, option, getattr(Client, option.upper()))
if self._proxy:
self._proxy["enabled"] = True
From da92a79b3c1f50559a1e9e04a886d0203297e8b1 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 17:47:14 +0200
Subject: [PATCH 20/21] Update README.rst
---
README.rst | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/README.rst b/README.rst
index 0b9efb76..db2957c3 100644
--- a/README.rst
+++ b/README.rst
@@ -26,7 +26,7 @@ Features
- **Easy to use**: You can easily install Pyrogram using pip and start building your app right away.
- **High-level**: The low-level details of MTProto are abstracted and automatically handled.
- **Fast**: Crypto parts are boosted up by TgCrypto_, a high-performance library written in pure C.
-- **Updated** to the latest Telegram API version, currently Layer 81 on top of MTProto 2.0.
+- **Updated** to the latest Telegram API version, currently Layer 82 on top of MTProto 2.0.
- **Documented**: The Pyrogram API is well documented and resembles the Telegram Bot API.
- **Full API**, allowing to execute any advanced action an official client is able to do, and more.
@@ -78,14 +78,13 @@ Copyright & License
Telegram MTProto API Client Library for Python
-
+
Download
@@ -100,25 +99,25 @@ Copyright & License
-
-
-.. |logo| image:: https://pyrogram.ml/images/logo.png
+.. |logo| image:: https://raw.githubusercontent.com/pyrogram/logos/master/logos/pyrogram_logo2.png
:target: https://pyrogram.ml
:alt: Pyrogram
.. |description| replace:: **Telegram MTProto API Client Library for Python**
-.. |scheme| image:: "https://img.shields.io/badge/SCHEME-LAYER%2081-eda738.svg?longCache=true&style=for-the-badge&colorA=262b30"
+.. |scheme| image:: "https://img.shields.io/badge/SCHEME-LAYER%2082-eda738.svg?longCache=true&style=for-the-badge&colorA=262b30"
:target: compiler/api/source/main_api.tl
:alt: Scheme Layer
-.. |tgcrypto| image:: "https://img.shields.io/badge/TGCRYPTO-V1.0.4-eda738.svg?longCache=true&style=for-the-badge&colorA=262b30"
+.. |tgcrypto| image:: "https://img.shields.io/badge/TGCRYPTO-V1.1.1-eda738.svg?longCache=true&style=for-the-badge&colorA=262b30"
:target: https://github.com/pyrogram/tgcrypto
:alt: TgCrypto
From cc47897c6889712158dea83718ad4f2c0bded9c3 Mon Sep 17 00:00:00 2001
From: Dan <14043624+delivrance@users.noreply.github.com>
Date: Wed, 19 Sep 2018 17:47:28 +0200
Subject: [PATCH 21/21] Update to v0.8.0
---
pyrogram/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py
index 1de05f2c..a1107ee1 100644
--- a/pyrogram/__init__.py
+++ b/pyrogram/__init__.py
@@ -23,7 +23,7 @@ __copyright__ = "Copyright (C) 2017-2018 Dan Tès